weekly seo

This commit is contained in:
2026-06-08 20:33:51 +02:00
parent d70a50f47a
commit e441bcb25f
8 changed files with 13106 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import { cookies } from 'next/headers'
import { headers } from 'next/headers'
import './globals.css'
import { LangProvider } from '@/context/LangContext'
import { siteConfig, hasIosStoreUrl } from '@/lib/site'
@@ -47,7 +48,9 @@ export const metadata: Metadata = {
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const cookieStore = await cookies()
const lang = (cookieStore.get('lang')?.value ?? 'de') as 'de' | 'en' | 'es'
const headerStore = await headers()
const routeLang = headerStore.get('x-greenlens-lang')
const lang = (routeLang ?? cookieStore.get('lang')?.value ?? 'de') as 'de' | 'en' | 'es'
const validLangs = ['de', 'en', 'es']
const htmlLang = validLangs.includes(lang) ? lang : 'de'