-
Notifications
You must be signed in to change notification settings - Fork 34
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
Showing
27 changed files
with
617 additions
and
244 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
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,32 @@ | ||
import { Inter } from "next/font/google"; | ||
import "@/app/globals.css"; | ||
import { ReactNode } from "react"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
export async function generateMetadata({ | ||
params: { locale }, | ||
}: { | ||
params: { locale: string }; | ||
}) { | ||
const t = await getTranslations({ locale, namespace: "Metadata" }); | ||
return { | ||
title: t("title"), | ||
description: t("description"), | ||
}; | ||
} | ||
|
||
const inter = Inter({ subsets: ["latin"] }); | ||
|
||
export default function RootLayout({ | ||
children, | ||
params: { locale }, | ||
}: { | ||
children: ReactNode; | ||
params: { locale: string }; | ||
}) { | ||
return ( | ||
<html lang={locale}> | ||
<body className={`${inter.className} bg-base-200`}>{children}</body> | ||
</html> | ||
); | ||
} |
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,29 @@ | ||
import Navbar from "@/components/navbar"; | ||
import SyncClipboard from "@/components/sync-clipboard"; | ||
import Notice from "@/components/notice"; | ||
import Footer from "@/components/footer"; | ||
import { NextIntlClientProvider, useMessages } from "next-intl"; | ||
|
||
export default function Home({ | ||
params: { locale }, | ||
}: { | ||
params: { locale: string }; | ||
}) { | ||
const messages = useMessages(); | ||
return ( | ||
<div className="min-h-screen flex flex-col items-center justify-between mx-auto max-w-5xl"> | ||
<header className="p-6 w-full"> | ||
<NextIntlClientProvider locale={locale} messages={messages}> | ||
<Navbar /> | ||
</NextIntlClientProvider> | ||
</header> | ||
<main className="flex-1 p-6 w-full"> | ||
<NextIntlClientProvider locale={locale} messages={messages}> | ||
<SyncClipboard /> | ||
</NextIntlClientProvider> | ||
<Notice /> | ||
</main> | ||
<Footer /> | ||
</div> | ||
); | ||
} |
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
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,18 @@ | ||
import { NextIntlClientProvider, useMessages } from "next-intl"; | ||
|
||
export default function UserLayout({ | ||
params: { locale }, | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
params: { locale: string }; | ||
}) { | ||
const messages = useMessages(); | ||
return ( | ||
<div className="min-h-screen flex flex-col items-center justify-center mx-auto"> | ||
<NextIntlClientProvider locale={locale} messages={messages}> | ||
{children} | ||
</NextIntlClientProvider> | ||
</div> | ||
); | ||
} |
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
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
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
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
Oops, something went wrong.