Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | import { ThemeProvider } from "@material-ui/core"; import { QueryClient, QueryClientProvider } from "react-query"; import { theme } from "../theme"; import { AuthContext } from "../features/auth/AuthProvider"; import "../fonts"; import "./i18n"; import "./reset.css"; import { Suspense } from "react"; export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, options: { storySort: { order: ["Couchers Storybook", "Components"], }, }, }; export const decorators = [ (Story, context) => { const client = new QueryClient({ defaultOptions: { queries: { refetchOnWindowFocus: false, retry: false }, }, }); return ( <Suspense fallback="loading..."> <AuthContext.Provider value={{ authState: { authenticated: true, userId: 1 } }} > <ThemeProvider theme={theme}> <QueryClientProvider client={client}> <Story {...context} /> </QueryClientProvider> </ThemeProvider> </AuthContext.Provider> </Suspense> ); }, ]; |