add options for layout, theme and color settings

This commit is contained in:
Ben Phelps 2022-09-15 19:58:41 +03:00
parent 05427253b9
commit 93d5dd88ba
5 changed files with 97 additions and 60 deletions

View file

@ -6,6 +6,8 @@ import "styles/weather-icons.css";
import "styles/theme.css";
import "utils/i18n";
import { ColorProvider } from "utils/color-context";
import { ThemeProvider } from "utils/theme-context";
function MyApp({ Component, pageProps }) {
return (
@ -14,7 +16,11 @@ function MyApp({ Component, pageProps }) {
fetcher: (resource, init) => fetch(resource, init).then((res) => res.json()),
}}
>
<Component {...pageProps} />
<ColorProvider>
<ThemeProvider>
<Component {...pageProps} />
</ThemeProvider>
</ColorProvider>
</SWRConfig>
);
}