Skip to content

Commit

Permalink
chore(docs): add 'use client' annotation (#215)
Browse files Browse the repository at this point in the history
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.`
  • Loading branch information
myeljoud authored Oct 4, 2023
1 parent e2821cd commit 135a6cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/pages/docs/app-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 135a6cf

Please sign in to comment.