()
| 70 | |
| 71 | // Initialize theme on module load (handles initial page load) |
| 72 | export function initializeTheme() { |
| 73 | const stored = localStorage.getItem('shipsec-theme'); |
| 74 | if (stored) { |
| 75 | try { |
| 76 | const parsed = JSON.parse(stored); |
| 77 | if (parsed?.state?.theme) { |
| 78 | applyTheme(parsed.state.theme); // No animation on initial load |
| 79 | } |
| 80 | } catch { |
| 81 | // Invalid stored value, use default |
| 82 | } |
| 83 | } |
| 84 | } |
no test coverage detected