Commit 2b3c8bc
authored
fix: Sync favicon to browser theme preference on initial load (#11518)
## Summary
- Fixes favicon always showing the dark variant regardless of browser
theme preference on non-docs routes
- The `useColorScheme` hook now syncs the initial value on mount, since
SSR defaults to "light" and React preserves that state during hydration
The `useEffect` previously only listened for **changes** to
`prefers-color-scheme`, but never set the correct value after hydration
when the browser was already in dark mode.1 parent 362e09d commit 2b3c8bc
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
0 commit comments