Files
cat-sitting-planner/app/[lang]/layout.tsx
elpatron 21a2d05d3a feat: add footer with attribution and source link
- Create Footer component with author info and repo link
- Add footer to root layout (appears on all pages)
- Include dedication to Lilly & Diego 🐈 🐈‍⬛
2026-01-12 23:56:24 +01:00

54 lines
1.2 KiB
TypeScript

import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "../globals.css";
import { Toaster } from "@/components/ui/sonner";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
import { getDictionary } from "@/get-dictionary";
import { Footer } from "@/components/footer";
export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }): Promise<Metadata> {
const { lang } = await params;
const dict = await getDictionary(lang as any);
return {
title: dict.home.title,
description: dict.home.description,
};
}
export async function generateStaticParams() {
return [{ lang: "en" }, { lang: "de" }];
}
export default async function RootLayout({
children,
params,
}: {
children: React.ReactNode;
params: Promise<{ lang: string }>;
}) {
const { lang } = await params;
return (
<html lang={lang}>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased flex flex-col min-h-screen`}
>
{children}
<Footer />
<Toaster />
</body>
</html>
);
}