diff --git a/src/app/(site)/[locale]/about/page.tsx b/src/app/(site)/[locale]/about/page.tsx index c25de22..33e57a7 100644 --- a/src/app/(site)/[locale]/about/page.tsx +++ b/src/app/(site)/[locale]/about/page.tsx @@ -1,6 +1,6 @@ import { notFound } from 'next/navigation' import { getDict, isLocale, locales } from '@/i18n' -import { loadContent } from '@/lib/content' +import { loadContent, loadLegal } from '@/lib/content' import { buildHomeModel } from '@/lib/home-model' import { SectionPage } from '@/components/SectionPage' import { Tbc } from '@/components/Tbc' @@ -18,7 +18,7 @@ export default async function Page({ params }: { params: Promise<{ locale: strin const t = getDict(locale) const { home, news } = await loadContent(locale) const m = buildHomeModel(home, news, t) - return 0}> + return 0}>

{t.mission.title}

{m.mission.text}

{t.sections.goals}

{t.sections.goalText}

{t.directions.title}

diff --git a/src/app/(site)/[locale]/news/[id]/page.tsx b/src/app/(site)/[locale]/news/[id]/page.tsx index 1703143..2ba52ad 100644 --- a/src/app/(site)/[locale]/news/[id]/page.tsx +++ b/src/app/(site)/[locale]/news/[id]/page.tsx @@ -1,7 +1,7 @@ import Link from 'next/link' import { notFound } from 'next/navigation' import { getDict, isLocale, locales } from '@/i18n' -import { loadNews } from '@/lib/content' +import { loadNews, loadLegal } from '@/lib/content' import { visibleNews } from '@/lib/news-model' import { SectionPage } from '@/components/SectionPage' @@ -26,7 +26,7 @@ export default async function Page({ params }: { params: Promise<{ locale: strin if (!n) notFound() const image = safeWebUrl(n.imageUrl) const source = safeWebUrl(n.sourceUrl) - return + return
{n.place &&

{n.place}

} diff --git a/src/app/(site)/[locale]/news/page.tsx b/src/app/(site)/[locale]/news/page.tsx index eb5c45b..c98d5ee 100644 --- a/src/app/(site)/[locale]/news/page.tsx +++ b/src/app/(site)/[locale]/news/page.tsx @@ -1,7 +1,7 @@ import Link from 'next/link' import { notFound } from 'next/navigation' import { getDict, isLocale, locales } from '@/i18n' -import { loadNews } from '@/lib/content' +import { loadNews, loadLegal } from '@/lib/content' import { visibleNews } from '@/lib/news-model' import { SectionPage } from '@/components/SectionPage' @@ -20,7 +20,7 @@ export default async function Page({ params }: { params: Promise<{ locale: strin const news = visibleNews(await loadNews(locale)) if (!news.length) notFound() const fmt = new Intl.DateTimeFormat(locale, { dateStyle: 'long' }) - return + return
    {news.map(n =>
  • {n.title}

    diff --git a/src/app/(site)/[locale]/projects/page.tsx b/src/app/(site)/[locale]/projects/page.tsx index caf5ec5..f84a0f8 100644 --- a/src/app/(site)/[locale]/projects/page.tsx +++ b/src/app/(site)/[locale]/projects/page.tsx @@ -1,6 +1,6 @@ import { notFound } from 'next/navigation' import { getDict, isLocale, locales } from '@/i18n' -import { loadContent } from '@/lib/content' +import { loadContent, loadLegal } from '@/lib/content' import { buildHomeModel } from '@/lib/home-model' import { SectionPage } from '@/components/SectionPage' import Image from 'next/image' @@ -19,7 +19,7 @@ export default async function Page({ params }: { params: Promise<{ locale: strin const t = getDict(locale) const { home, news } = await loadContent(locale) const m = buildHomeModel(home, news, t) - return 0}> + return 0}>
    {t.book.cover}

    {t.book.author}

    {t.book.title}

    {t.book.paragraphs.map(text =>

    {text}

    )}{t.projects.more}
    diff --git a/src/components/SectionPage.tsx b/src/components/SectionPage.tsx index 6da07ed..5ee926f 100644 --- a/src/components/SectionPage.tsx +++ b/src/components/SectionPage.tsx @@ -1,8 +1,9 @@ import { Header } from './Header' import { Footer } from './Footer' +import type { CmsLegal } from '@/lib/legal-model' import type { Dict, Locale } from '@/i18n' -export function SectionPage({ t, locale, path, title, showNews, children }: { t: Dict; locale: Locale; path: string; title: string; showNews: boolean; children: React.ReactNode }) { +export function SectionPage({ t, locale, path, title, showNews, legal, children }: { t: Dict; locale: Locale; path: string; title: string; showNews: boolean; legal: CmsLegal | null; children: React.ReactNode }) { return <>
    @@ -10,6 +11,6 @@ export function SectionPage({ t, locale, path, title, showNews, children }: { t: {t.sections.review &&

    {t.sections.review}

    } {children}
    -