Phase 2: Language Context & Selector - Add language dropdown to Header and auth pages
- Create LanguageSelector component with dropdown (shows flag + name) - Add LanguageSelector to Header (right side, near user email/logout) - Add LanguageSelector to login, signup, and signup/[code] pages - Create test-utils.tsx with renderWithProviders helper - Add vitest.setup.ts to mock localStorage - Update all test files to use renderWithProviders - Language selector persists choice in localStorage - HTML lang attribute updates dynamically based on selected language All frontend and e2e tests passing.
This commit is contained in:
parent
f7553df05d
commit
f86ec8b62d
11 changed files with 214 additions and 37 deletions
|
|
@ -4,6 +4,7 @@ import { useState } from "react";
|
|||
import { useRouter } from "next/navigation";
|
||||
import { useAuth } from "../auth-context";
|
||||
import { authFormStyles as styles } from "../styles/auth-form";
|
||||
import { LanguageSelector } from "../components/LanguageSelector";
|
||||
|
||||
export default function LoginPage() {
|
||||
const [email, setEmail] = useState("");
|
||||
|
|
@ -30,6 +31,9 @@ export default function LoginPage() {
|
|||
|
||||
return (
|
||||
<main style={styles.main}>
|
||||
<div style={{ position: "absolute", top: "1rem", right: "1rem" }}>
|
||||
<LanguageSelector />
|
||||
</div>
|
||||
<div style={styles.container}>
|
||||
<div style={styles.card}>
|
||||
<div style={styles.header}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue