/** * Locale-aware Link STUB. * * This stub is a thin pass-through: it accepts the `lng` prop but does not * prefix URLs. A localized app can replace the body with a wrapper that * injects its locale path parameter into TanStack Router's ``. * * If your app is single-locale, this is fine as-is. * * If you have a multi-locale strategy, replace the body with your own Link wrapper. */ import type React from 'react' import { Link } from '@tanstack/react-router' import type { Locale } from '../../types/i18n' export interface LangLinkProps extends Omit, 'children'> { to: string lng?: Locale params?: Record search?: | true | Record | ((current: Record) => Record) forceReload?: boolean scroll?: boolean replace?: boolean ref?: React.Ref children?: React.ReactNode } export function LangLink({ to, lng: _lng, params, search, forceReload, scroll, replace, ref, children, ...rest }: LangLinkProps): React.JSX.Element { if (forceReload) { return ( {children} ) } return ( {children} ) }