-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7dd958
commit be2fdd0
Showing
9 changed files
with
14,780 additions
and
11,919 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { getRequestConfig } from "next-intl/server"; | ||
|
||
export default getRequestConfig(async () => { | ||
// Provide a static locale, fetch a user setting, | ||
// read from `cookies()`, `headers()`, etc. | ||
const locale = "en"; | ||
|
||
return { | ||
locale, | ||
messages: (await import(`../messages/${locale}.json`)).default, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
import { geistMono, inter, satoshi } from "@/styles/fonts"; | ||
import "@/styles/globals.css"; | ||
import { cn, constructMetadata } from "@dub/utils"; | ||
import { NextIntlClientProvider } from "next-intl"; | ||
import { getMessages } from "next-intl/server"; | ||
import RootProviders from "./providers"; | ||
|
||
export const metadata = constructMetadata(); | ||
|
||
export default function RootLayout({ | ||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const messages = await getMessages(); | ||
|
||
return ( | ||
<html | ||
lang="en" | ||
className={cn(satoshi.variable, inter.variable, geistMono.variable)} | ||
> | ||
<body> | ||
<RootProviders>{children}</RootProviders> | ||
</body> | ||
</html> | ||
<NextIntlClientProvider messages={messages}> | ||
<html | ||
lang="en" | ||
className={cn(satoshi.variable, inter.variable, geistMono.variable)} | ||
> | ||
<body> | ||
<RootProviders>{children}</RootProviders> | ||
</body> | ||
</html> | ||
</NextIntlClientProvider> | ||
); | ||
} |
Oops, something went wrong.