23 lines
672 B
TypeScript
23 lines
672 B
TypeScript
import { getDictionary } from "@/get-dictionary";
|
|
import type { Locale } from "@/i18n-config";
|
|
import HomeClient from "@/components/HomeClient";
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ lang: Locale }> }) {
|
|
const { lang } = await params;
|
|
const dict = await getDictionary(lang);
|
|
return {
|
|
title: dict.meta.home.title,
|
|
description: dict.meta.home.desc,
|
|
alternates: {
|
|
canonical: `/${lang}`,
|
|
},
|
|
};
|
|
}
|
|
|
|
export default async function Page({ params }: { params: Promise<{ lang: Locale }> }) {
|
|
const { lang } = await params;
|
|
const dict = await getDictionary(lang);
|
|
|
|
return <HomeClient lang={lang} dict={dict} />;
|
|
}
|