mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-20 20:20:49 -05:00
move ThemeProvider script up in priority
This commit is contained in:
@@ -55,7 +55,14 @@ const App = ({ Component, pageProps }: AppProps) => {
|
|||||||
const getLayout = Component.getLayout || ((page) => <Layout>{page}</Layout>);
|
const getLayout = Component.getLayout || ((page) => <Layout>{page}</Layout>);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<ThemeProvider
|
||||||
|
// theme classnames are generated dynamically by stitches, so have ThemeProvider pull them from there
|
||||||
|
attribute="class"
|
||||||
|
value={{
|
||||||
|
light: theme.className,
|
||||||
|
dark: darkTheme.className,
|
||||||
|
}}
|
||||||
|
>
|
||||||
{/* all SEO config is in ../lib/config/seo.ts except for canonical URLs, which require access to next router */}
|
{/* all SEO config is in ../lib/config/seo.ts except for canonical URLs, which require access to next router */}
|
||||||
<DefaultSeo
|
<DefaultSeo
|
||||||
{...defaultSeo}
|
{...defaultSeo}
|
||||||
@@ -70,17 +77,8 @@ const App = ({ Component, pageProps }: AppProps) => {
|
|||||||
/>
|
/>
|
||||||
<SocialProfileJsonLd {...socialProfileJsonLd} />
|
<SocialProfileJsonLd {...socialProfileJsonLd} />
|
||||||
|
|
||||||
<ThemeProvider
|
{getLayout(<Component {...pageProps} />)}
|
||||||
// theme classnames are generated dynamically by stitches, so have ThemeProvider pull them from there
|
</ThemeProvider>
|
||||||
attribute="class"
|
|
||||||
value={{
|
|
||||||
light: theme.className,
|
|
||||||
dark: darkTheme.className,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{getLayout(<Component {...pageProps} />)}
|
|
||||||
</ThemeProvider>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user