import Link from 'next/link' import { locales, type Dict, type Locale } from '@/i18n' /** `path` — текущая страница без языка ('' — главная): переключатель языка ведёт на ту же страницу, якоря — на главную. */ export function Header({ t, locale, showProjects, showNews, path = '' }: { t: Dict; locale: Locale; showProjects: boolean; showNews: boolean; path?: string }) { const links = [ ['/about', t.sections.about, true], ['/about#directions', t.nav.directions, true], ['/projects', t.nav.projects, showProjects], ['/news', t.news.title, showNews], ['/contacts', t.sections.contacts, true], ] as const return (
{t.siteName}
{locales.map((l) => ( {l.toUpperCase()} ))}
) }