Greek Language Hydration Lint Fix
Section titled “Greek Language Hydration Lint Fix”This update keeps the ThemeSwitcher hydration-safe without violating the React hooks lint rule.
What changed
Section titled “What changed”- Replaced direct language
setStateinuseEffectwithuseSyncExternalStore. - The server and first client render still use the default language snapshot, preventing hydration mismatches.
- After hydration, the client reads the persisted language from localStorage and updates the UI.
- Language changes still sync through the existing
nutsnews:language-changeevent and cross-tabstorageevents.
Files changed
Section titled “Files changed”web/app/components/ThemeSwitcher.tsx
