Replaced localStorage-only hook with React Context Provider. Layout and page components now share the same state — switching language in the dropdown instantly updates all text on screen without requiring a page reload. NativeLanguageProvider added to root layout.tsx. useNativeLanguage() re-exported from Context for backward compat. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 lines
137 B
TypeScript
5 lines
137 B
TypeScript
'use client'
|
|
|
|
// Re-export from Context so all existing imports keep working
|
|
export { useNativeLanguage } from './NativeLanguageContext'
|