import { loadBookCover } from '@/lib/book-project' import { bookProjectPath } from '@/lib/project-paths' import { BookLink } from '@/components/BookLink' import { BookWhere } from '@/components/BookWhere' import { PhotoGallery } from '@/components/PhotoGallery' import Image from 'next/image' import Link from 'next/link' import { notFound } from 'next/navigation' import { Header } from '@/components/Header' import { Footer } from '@/components/Footer' import { getDict, isLocale } from '@/i18n' import { loadContent, loadLegal, loadSettings } from '@/lib/content' import { bookPhotoList } from '@/lib/site-model' import { bookUrl } from '@/lib/home-model' export const dynamic = 'force-dynamic' const photos = [1, 2, 3, 4].map(n => ({ src: `/books/serkebayev/photo-${n}.jpg`, alt: `PHOTO ${n}` })) export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params if (!isLocale(locale)) notFound() const t = getDict(locale) return { title: `${t.book.title} — ${t.siteName}`, description: t.book.paragraphs.join(' ') } } export default async function BookProject({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params if (!isLocale(locale)) notFound() const t = getDict(locale) const bookCover = await loadBookCover() const { news } = await loadContent(locale) const list = bookPhotoList(await loadSettings(locale), photos) return <>
0} path={bookProjectPath} />
{t.projects.title}
{bookCover && {t.book.cover}}

{t.book.author}

{t.book.title}

{t.book.translationReview &&

{t.book.translationReview}

} {[...t.book.paragraphs, ...t.book.additions].map(text =>

{text}

)}

{t.book.gallery}

({ src: p.src, alt: `${t.book.photo} ${i + 1}` }))} t={t.book} />