Update homepage routes to include language and mode
Build & Deploy / Build & Push Docker Image (push) Successful in 2m51s
Test / Type Check (all packages) (push) Successful in 52s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 49s
Test / Homepage Unit Tests (push) Successful in 44s
Test / Storefront Unit Tests (push) Successful in 39s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 40s
Test / API Integration Tests (push) Successful in 1m0s

This commit is contained in:
root
2026-07-02 14:10:17 -04:00
parent 56c3bcf666
commit 781512399b
51 changed files with 792 additions and 344 deletions
@@ -4,8 +4,8 @@ import { Button } from '@/components/actions/Button';
import { FormField } from '@/components/forms/FormField';
import { AuthShell } from '@/components/auth/AuthShell';
import { API_BASE } from '@/lib/api';
import { localizedPath, type Locale } from '@/lib/localization/config';
import { useSearchParams } from 'next/navigation';
import { localizedModePath, modeFromPathname, type Locale } from '@/lib/localization/config';
import { usePathname, useSearchParams } from 'next/navigation';
import { Suspense, useState } from 'react';
import styles from './AuthForms.module.css';
@@ -88,6 +88,7 @@ const dicts: Record<string, Dict> = {
function ResetPasswordContent({ locale }: { locale: Locale }) {
const dict = (dicts[locale] ?? dicts.en) as Dict;
const searchParams = useSearchParams();
const mode = modeFromPathname(usePathname());
const token = searchParams.get('token');
const [password, setPassword] = useState('');
@@ -139,8 +140,8 @@ function ResetPasswordContent({ locale }: { locale: Locale }) {
}
}
const signInHref = localizedPath('sign-in', locale);
const forgotHref = localizedPath('forgot-password', locale);
const signInHref = localizedModePath('sign-in', locale, mode);
const forgotHref = localizedModePath('forgot-password', locale, mode);
if (!token) {
return (