From fe16e499828a8d97b498f60048f4215d188e8c9c Mon Sep 17 00:00:00 2001 From: Ivan Dalmet Date: Thu, 5 Oct 2023 15:06:09 +0200 Subject: [PATCH] fix: Extract tRPC provider from Providers --- src/app/Document.tsx | 13 ++++++++----- src/app/Providers.tsx | 3 +-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app/Document.tsx b/src/app/Document.tsx index c6badc8f2..36612f57d 100644 --- a/src/app/Document.tsx +++ b/src/app/Document.tsx @@ -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 }) => { @@ -68,11 +69,13 @@ export const Document = ({ children }: { children: ReactNode }) => { storageKey={COLOR_MODE_STORAGE_KEY} /> - - {children} - - - + + + {children} + + + + ); diff --git a/src/app/Providers.tsx b/src/app/Providers.tsx index 3c0ef3836..f27aa2883 100644 --- a/src/app/Providers.tsx +++ b/src/app/Providers.tsx @@ -7,7 +7,6 @@ import { useTranslation } from 'react-i18next'; import '@/lib/dayjs/config'; import '@/lib/i18n/client'; import { AVAILABLE_LANGUAGES } from '@/lib/i18n/constants'; -import { TrpcProvider } from '@/lib/trpc/TrpcProvider'; import theme, { COLOR_MODE_STORAGE_KEY } from '@/theme'; const localStorageManager = createLocalStorageManager(COLOR_MODE_STORAGE_KEY); @@ -28,7 +27,7 @@ export const Providers: FC> = ({ 'ltr', }} > - {children} + {children} );