|
|
@ -8,9 +8,6 @@ import { useMemo } from "react";
|
|
|
|
import { QueryClient, QueryClientProvider } from "react-query";
|
|
|
|
import { QueryClient, QueryClientProvider } from "react-query";
|
|
|
|
import { ReactQueryDevtools } from "react-query/devtools";
|
|
|
|
import { ReactQueryDevtools } from "react-query/devtools";
|
|
|
|
|
|
|
|
|
|
|
|
import createCache from "@emotion/cache";
|
|
|
|
|
|
|
|
import { CacheProvider } from "@emotion/react";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import CssBaseline from "@mui/material/CssBaseline";
|
|
|
|
import CssBaseline from "@mui/material/CssBaseline";
|
|
|
|
import { ThemeProvider } from "@mui/material/styles";
|
|
|
|
import { ThemeProvider } from "@mui/material/styles";
|
|
|
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
|
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
|
@ -21,15 +18,12 @@ import "@styles/globals.sass";
|
|
|
|
|
|
|
|
|
|
|
|
const queryClient = new QueryClient();
|
|
|
|
const queryClient = new QueryClient();
|
|
|
|
|
|
|
|
|
|
|
|
const cache = createCache({ key: "next" });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const App = ({ Component, pageProps }: AppProps) => {
|
|
|
|
const App = ({ Component, pageProps }: AppProps) => {
|
|
|
|
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
|
|
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
|
|
|
|
|
|
|
|
|
|
const theme = useMemo(() => createTheme(prefersDarkMode), [prefersDarkMode]);
|
|
|
|
const theme = useMemo(() => createTheme(prefersDarkMode), [prefersDarkMode]);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<CacheProvider value={cache}>
|
|
|
|
|
|
|
|
<QueryClientProvider client={queryClient}>
|
|
|
|
<QueryClientProvider client={queryClient}>
|
|
|
|
{process.env.NODE_ENV != "production" && (
|
|
|
|
{process.env.NODE_ENV != "production" && (
|
|
|
|
<ReactQueryDevtools initialIsOpen={true} />
|
|
|
|
<ReactQueryDevtools initialIsOpen={true} />
|
|
|
@ -40,7 +34,6 @@ const App = ({ Component, pageProps }: AppProps) => {
|
|
|
|
<Component {...pageProps} />
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</ThemeProvider>
|
|
|
|
</ThemeProvider>
|
|
|
|
</QueryClientProvider>
|
|
|
|
</QueryClientProvider>
|
|
|
|
</CacheProvider>
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|