Files
units-ui/app
Sebastian Krüger 1e1489ec58 fix: prevent theme flicker on page load
Add blocking script in HTML head to apply theme before React hydration.
This eliminates the flash of wrong theme (FOUT) that occurred when the
page loaded with default theme before useEffect could apply the saved theme.

The script:
- Runs synchronously before page render
- Reads theme from localStorage
- Applies dark/light class to <html> element immediately
- Handles system theme preference detection
- Wrapped in try-catch for safety

This ensures users see the correct theme from the first paint, with no flicker.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 17:18:28 +01:00
..