All checks were successful
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
30 lines
2.0 KiB
TypeScript
30 lines
2.0 KiB
TypeScript
import { notFound } from 'next/navigation'
|
|
import { getDict, isLocale, locales } from '@/i18n'
|
|
import { loadContent, loadLegal } from '@/lib/content'
|
|
import { buildHomeModel } from '@/lib/home-model'
|
|
import { SectionPage } from '@/components/SectionPage'
|
|
import { Tbc } from '@/components/Tbc'
|
|
|
|
export const dynamic = 'force-dynamic'
|
|
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params
|
|
if (!isLocale(locale)) notFound()
|
|
const t = getDict(locale)
|
|
return { title: `${t.sections.about} — ${t.siteName}`, description: t.metaDescription, alternates: { languages: Object.fromEntries(locales.map(l => [l, `/${l}/about`])) } }
|
|
}
|
|
export default async function Page({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params
|
|
if (!isLocale(locale)) notFound()
|
|
const t = getDict(locale)
|
|
const { home, news } = await loadContent(locale)
|
|
const m = buildHomeModel(home, news, t)
|
|
return <SectionPage legal={await loadLegal(locale)} t={t} locale={locale} path="/about" title={t.sections.about} showNews={m.news.length > 0}>
|
|
<section><h2 className="font-serif text-2xl">{t.mission.title}</h2><p className="mt-4 max-w-3xl text-lg">{m.mission.text}</p></section>
|
|
<section className="mt-12"><h2 className="font-serif text-2xl">{t.sections.goals}</h2><p className="mt-4 max-w-3xl">{t.sections.goalText}</p></section>
|
|
<section id="directions" className="mt-12 scroll-mt-8"><h2 className="font-serif text-2xl">{t.directions.title}</h2>
|
|
<ul className="mt-6 grid gap-6 sm:grid-cols-2">{m.directions.map(d => <li key={d.title} className="border border-line p-6"><h3 className="font-serif text-xl">{d.title}</h3><p className="mt-3">{d.text ?? t.tbc}</p></li>)}</ul>
|
|
</section>
|
|
<div className="mt-12 grid gap-6 sm:grid-cols-3">{[t.sections.founder,t.sections.leadership,t.sections.board].map(label => <section key={label}><h2 className="mb-4 font-serif text-2xl">{label}</h2><Tbc label={t.tbc} /></section>)}</div>
|
|
</SectionPage>
|
|
}
|