Fix color scheme default (#4185)

Small follower for #4184

### Change type

- [x] `bugfix`
This commit is contained in:
Steve Ruiz 2024-07-16 13:39:33 +01:00 committed by GitHub
parent 792de3c64e
commit 62fe6561c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,10 @@ export function ColorSchemeMenu() {
const trackEvent = useUiEvents()
const currentColorScheme = useValue(
'colorScheme',
() => editor.user.getUserPreferences().colorScheme ?? 'system',
() =>
editor.user.getUserPreferences().colorScheme ?? editor.user.getIsDarkMode()
? 'dark'
: 'light',
[editor]
)