fix french homepage
Build & Deploy / Build & Push Docker Image (push) Failing after 49s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / API Unit Tests (push) Failing after 5m6s
Test / Marketplace Unit Tests (push) Has been cancelled
Test / Admin Unit Tests (push) Has been cancelled
Test / Dashboard Unit Tests (push) Has been cancelled
Test / API Integration Tests (push) Has been cancelled

This commit is contained in:
root
2026-06-26 21:49:06 -04:00
parent 35172ab46b
commit 7962bf9a92
6 changed files with 19 additions and 11 deletions
@@ -1,6 +1,7 @@
'use client';
import { localizedPath, locales, type Locale } from '@/lib/localization/config';
import { persistLocale } from '@/lib/localization/client';
import { persistTheme, themePreferenceEvent } from '@/lib/theme/client';
import { type ThemePreference } from '@/lib/theme/config';
import Image from 'next/image';
@@ -62,6 +63,7 @@ export function AuthHeader({ locale, themePreference: initialPref }: Props) {
const switchLocale = (next: Locale) => {
setLocaleOpen(false);
persistLocale(next);
const segments = pathname.split('/').filter(Boolean);
if (segments.length >= 2) segments[1] = next;
router.push('/' + segments.join('/'));
@@ -3,6 +3,7 @@
import { usePathname } from 'next/navigation';
import { SiteHeader } from './SiteHeader';
import { AuthHeader } from './AuthHeader';
import { routeIdFromPathname } from '@/lib/localization/config';
import type { ShellMessages } from '@/lib/localization/messages';
import type { Locale } from '@/lib/localization/config';
import type { ThemePreference } from '@/lib/theme/config';
@@ -15,7 +16,8 @@ interface Props {
export function HeaderRouter({ locale, messages, themePreference }: Props) {
const pathname = usePathname();
const isAuth = pathname.endsWith('/sign-in') || pathname.endsWith('/forgot-password');
const routeId = routeIdFromPathname(pathname);
const isAuth = routeId === 'sign-in' || routeId === 'forgot-password';
if (isAuth) {
return <AuthHeader locale={locale} themePreference={themePreference} />;
@@ -61,6 +61,7 @@
color: var(--text-primary);
font-weight: 650;
text-decoration: none;
white-space: nowrap;
}
.navigation a {