mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-09-22 15:22:59 +00:00
Add English translation to page with next-intl
This commit is contained in:
26
src/components/SidebarLayoutServer.tsx
Normal file
26
src/components/SidebarLayoutServer.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import SidebarLayoutClient from "./SidebarLayoutClient";
|
||||
|
||||
export default async function SidebarLayoutServer() {
|
||||
const t = await getTranslations("common");
|
||||
|
||||
const themeLabels = {
|
||||
light: t("theme.light"),
|
||||
dark: t("theme.dark"),
|
||||
system: t("theme.system"),
|
||||
};
|
||||
|
||||
const navT = await getTranslations("navigation");
|
||||
|
||||
const navItems = [
|
||||
{ href: "/" as const, label: navT("home") },
|
||||
{ href: "/messiala" as const, label: navT("expo") },
|
||||
{ href: "/piletid" as const, label: navT("tickets") },
|
||||
{ href: "/ajakava" as const, label: navT("schedule") },
|
||||
{ href: "/turniirid" as const, label: navT("tournaments") },
|
||||
{ href: "/kodukord" as const, label: navT("houserules") },
|
||||
{ href: "/reeglid" as const, label: navT("rules") },
|
||||
];
|
||||
|
||||
return <SidebarLayoutClient themeLabels={themeLabels} navItems={navItems} />;
|
||||
}
|
||||
Reference in New Issue
Block a user