Files
kozmos-qr-menu/app/[lang]/layout.tsx
T
mstfyldzandClaude Sonnet 4.6 718e0a6228 Build Kozmos QR menu site — full implementation
Next.js 16 App Router, TR/EN i18n via [lang] routing and proxy.ts,
Tailwind v4, minimal list menu style, sticky bottom tab bar with
Intersection Observer, PWA manifest, WhatsApp fixed button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 02:35:14 +03:00

43 lines
977 B
TypeScript

import type { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { getDictionary, hasLocale } from './dictionaries'
export async function generateStaticParams() {
return [{ lang: 'tr' }, { lang: 'en' }]
}
export async function generateMetadata({
params,
}: {
params: Promise<{ lang: string }>
}): Promise<Metadata> {
const { lang } = await params
if (!hasLocale(lang)) return {}
const dict = await getDictionary(lang)
return {
title: dict.meta.title,
description: dict.meta.description,
manifest: '/manifest.webmanifest',
appleWebApp: {
capable: true,
statusBarStyle: 'black-translucent',
title: 'Kozmos',
},
other: {
'theme-color': '#3D2B1F',
},
}
}
export default async function LangLayout({
children,
params,
}: {
children: React.ReactNode
params: Promise<{ lang: string }>
}) {
const { lang } = await params
if (!hasLocale(lang)) notFound()
return <>{children}</>
}