()
| 55 | }, [mode]) |
| 56 | |
| 57 | function toggleMode() { |
| 58 | const nextMode: ThemeMode = |
| 59 | mode === 'light' ? 'dark' : mode === 'dark' ? 'auto' : 'light' |
| 60 | setMode(nextMode) |
| 61 | applyThemeMode(nextMode) |
| 62 | window.localStorage.setItem('theme', nextMode) |
| 63 | } |
| 64 | |
| 65 | const label = |
| 66 | mode === 'auto' |
nothing calls this directly
no test coverage detected