Default theme to Sage (consumer) for all new users
Some checks failed
Stuffle/nebula-client/pipeline/head There was a failure building this commit
Some checks failed
Stuffle/nebula-client/pipeline/head There was a failure building this commit
- resolveStoredTheme() falls back to 'consumer' instead of 'dark' - ThemeContext default also updated to 'consumer' - Users with a previously saved theme are unaffected (localStorage wins) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,7 @@ export interface ThemeContextValue {
|
||||
}
|
||||
|
||||
export const ThemeContext = createContext<ThemeContextValue>({
|
||||
theme: 'dark',
|
||||
theme: 'consumer',
|
||||
toggleTheme: () => { },
|
||||
toggleWithTransition: () => { },
|
||||
setTheme: () => { },
|
||||
|
||||
@@ -6,9 +6,9 @@ function resolveStoredTheme(): Theme {
|
||||
const stored = localStorage.getItem('nbl-theme')
|
||||
const valid: Theme[] = ['light', 'warm', 'dim', 'dark', 'terra', 'dusk', 'slate', 'consumer']
|
||||
if (valid.includes(stored as Theme)) return stored as Theme
|
||||
// Migrate any unrecognised or old values to dark (Agos — the primary theme)
|
||||
// Migrate any unrecognised or old values to consumer (Sage — the default)
|
||||
} catch { /* ignore */ }
|
||||
return 'dark'
|
||||
return 'consumer'
|
||||
}
|
||||
|
||||
function applyTheme(t: Theme) {
|
||||
|
||||
Reference in New Issue
Block a user