Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…news.com.br into UserProvider
  • Loading branch information
aprendendofelipe committed Jun 11, 2022
2 parents 6a3f83b + 3d635dd commit a0012a7
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions pages/_app.public.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ThemeProvider, BaseStyles, SSRProvider } from '@primer/react';
import { SWRConfig } from 'swr';
import { UserProvider } from 'pages/interface/hooks/useUser/index.js';

async function SWRFetcher(resource, init) {
const response = await fetch(resource, init);
Expand All @@ -10,18 +11,20 @@ async function SWRFetcher(resource, init) {

function MyApp({ Component, pageProps }) {
return (
<SWRConfig
value={{
fetcher: SWRFetcher,
}}>
<SSRProvider>
<ThemeProvider preventSSRMismatch colorMode="day">
<BaseStyles>
<Component {...pageProps} />
</BaseStyles>
</ThemeProvider>
</SSRProvider>
</SWRConfig>
<UserProvider>
<SWRConfig
value={{
fetcher: SWRFetcher,
}}>
<SSRProvider>
<ThemeProvider preventSSRMismatch colorMode="day">
<BaseStyles>
<Component {...pageProps} />
</BaseStyles>
</ThemeProvider>
</SSRProvider>
</SWRConfig>
</UserProvider>
);
}

Expand Down

0 comments on commit a0012a7

Please sign in to comment.