// Root layout that wraps every page in this app. `` / `` / // `` are owned by the framework's index.html shell — don't render // them here. Use a page's `meta` export for title + meta tags, and // `theme: 'dark' | 'light' | 'system'` in app.config.ts for the dark class. // // The app is bilingual (see `locales` in app.config.ts): nav labels come from // the catalog via ``, and writes the `voltro:locale` cookie // + reloads so the framework re-renders in the chosen language. import type { ReactNode } from 'react' import { T, useLocale, useT } from '@voltro/i18n' import { LocaleSwitcher } from '@voltro/ui-shadcn' interface LayoutProps { readonly children: ReactNode } const LOCALES = [ { code: 'en', label: 'English' }, { code: 'de', label: 'Deutsch' }, ] export default function Layout({ children }: LayoutProps): ReactNode { const locale = useLocale() const langLabel = useT('lang.label') return (
{{capProjectName}} {/* Internal s are SPA-intercepted by the Router (no full reload). */}
{children}
) }