From 95b78298a6e85927b198746c81bae66df4098335 Mon Sep 17 00:00:00 2001 From: Mohamed Yahye El Joud Date: Wed, 4 Oct 2023 08:22:22 +0000 Subject: [PATCH] Update app-setup.mdx Added `"client only"` at the top of the `locales/client.ts` to prevent Next.js from yelling `'client-only' cannot be imported from a Server Component module. It should only be used from a Client Component.` --- docs/pages/docs/app-setup.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/docs/app-setup.mdx b/docs/pages/docs/app-setup.mdx index 544010b..a6c801a 100644 --- a/docs/pages/docs/app-setup.mdx +++ b/docs/pages/docs/app-setup.mdx @@ -14,6 +14,7 @@ Create `locales/client.ts` and `locales/server.ts` with your locales: ```ts // locales/client.ts +"use client" import { createI18nClient } from 'next-international/client' export const { useI18n, useScopedI18n, I18nProviderClient } = createI18nClient({