Files
sass-mohfarawati/app/[locale]/(site)/about/page.tsx
T
MOH c18128c965
CI / quality (push) Waiting to run
Fix runtime default locale resolution
2026-03-15 06:02:27 +01:00

53 lines
1.6 KiB
TypeScript

import type { Metadata } from "next";
import { getTranslations } from "next-intl/server";
import { Container } from "@/components/layout/container";
import { PageHero } from "@/components/layout/page-hero";
import { AppCard } from "@/components/ui/app-card";
import { FALLBACK_LOCALE, resolveLocale } from "@/lib/locale";
import { buildLocalizedMetadata } from "@/lib/metadata";
type AboutPageProps = {
params: Promise<{
locale: string;
}>;
};
export const dynamic = "force-dynamic";
export async function generateMetadata({ params }: AboutPageProps): Promise<Metadata> {
const { locale } = await params;
const localeKey = resolveLocale(locale, FALLBACK_LOCALE);
const t = await getTranslations({ locale: localeKey, namespace: "aboutPage" });
return await buildLocalizedMetadata({
locale: localeKey,
pathname: "/about",
title: t("title"),
description: t("description"),
});
}
export default async function AboutPage({ params }: AboutPageProps) {
const { locale } = await params;
const localeKey = resolveLocale(locale, FALLBACK_LOCALE);
const t = await getTranslations({ locale: localeKey, namespace: "aboutPage" });
return (
<>
<PageHero
locale={localeKey}
badge={t("heroEyebrow")}
title={t("title")}
description={t("description")}
/>
<Container className="pb-16 lg:pb-20">
<AppCard level={3} padding="lg" className="mx-auto max-w-3xl text-center">
<p className="text-lg font-medium text-foreground">{t("placeholder")}</p>
</AppCard>
</Container>
</>
);
}