Closed Fionn96 closed 5 months ago
You need to wrap client components inside I18nClientProvider
, as the error message suggests. In your codesandbox you're doing it for the /client
page inside the layout.tsx
, so you can just move the layout from /app/[locale]/client/layout.tsx
to /app/[locale]/layout.tsx
.
I have a client component that needs to be used in the server page. When I try to import it directly, I get the error "Error:
useI18n
must be used insideI18nProvider
". How to solve it?codesandbox