Skip to content

Commit

Permalink
fix: Extract tRPC provider from Providers
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-dalmet committed Oct 5, 2023
1 parent 1616c49 commit 72de0ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/app/Document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Viewport } from '@/components/Viewport';
import { EnvDevHint } from '@/layout/EnvDevHint';
import i18n from '@/lib/i18n/client';
import { AVAILABLE_LANGUAGES } from '@/lib/i18n/constants';
import { TrpcProvider } from '@/lib/trpc/TrpcProvider';
import theme, { COLOR_MODE_STORAGE_KEY } from '@/theme';

export const Document = ({ children }: { children: ReactNode }) => {
Expand Down Expand Up @@ -68,11 +69,13 @@ export const Document = ({ children }: { children: ReactNode }) => {
storageKey={COLOR_MODE_STORAGE_KEY}
/>

<Providers>
<Viewport>{children}</Viewport>
<EnvDevHint />
<ReactQueryDevtools initialIsOpen={false} />
</Providers>
<TrpcProvider>
<Providers>
<Viewport>{children}</Viewport>
<EnvDevHint />
<ReactQueryDevtools initialIsOpen={false} />
</Providers>
</TrpcProvider>
</body>
</html>
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const Providers: FC<React.PropsWithChildren<unknown>> = ({
'ltr',
}}
>
<TrpcProvider>{children}</TrpcProvider>
{children}
</ChakraProvider>
</CacheProvider>
);
Expand Down

1 comment on commit 72de0ab

@vercel
Copy link

@vercel vercel bot commented on 72de0ab Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.