homepage/src/pages/_app.jsx

33 lines
914 B
React
Raw Normal View History

2022-09-07 16:53:24 +03:00
/* eslint-disable react/jsx-props-no-spreading */
2022-08-24 10:44:35 +03:00
import { SWRConfig } from "swr";
2022-09-25 19:43:00 +03:00
import { appWithTranslation } from "next-i18next";
2022-09-08 11:48:16 +03:00
2022-08-24 10:44:35 +03:00
import "styles/globals.css";
2022-08-25 11:14:17 +03:00
import "styles/theme.css";
import "styles/manrope.css";
2022-09-25 19:43:00 +03:00
import nextI18nextConfig from "../../next-i18next.config";
2022-08-24 10:44:35 +03:00
import { ColorProvider } from "utils/contexts/color";
import { ThemeProvider } from "utils/contexts/theme";
import { SettingsProvider } from "utils/contexts/settings";
2022-09-08 11:48:16 +03:00
2022-08-24 10:44:35 +03:00
function MyApp({ Component, pageProps }) {
return (
<SWRConfig
value={{
2022-08-25 11:14:17 +03:00
fetcher: (resource, init) => fetch(resource, init).then((res) => res.json()),
2022-08-24 10:44:35 +03:00
}}
>
<ColorProvider>
<ThemeProvider>
<SettingsProvider>
<Component {...pageProps} />
</SettingsProvider>
</ThemeProvider>
</ColorProvider>
2022-08-24 10:44:35 +03:00
</SWRConfig>
);
}
2022-09-25 19:43:00 +03:00
export default appWithTranslation(MyApp, nextI18nextConfig);