File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ const DEFAULT_CUSTOM_COLORS: CustomThemeColors = {
58
58
} ;
59
59
60
60
export const ThemeProvider : React . FC < { children : React . ReactNode } > = ( { children } ) => {
61
- const [ theme , setThemeState ] = useState < ThemeMode > ( 'dark ' ) ;
61
+ const [ theme , setThemeState ] = useState < ThemeMode > ( 'gray ' ) ;
62
62
const [ customColors , setCustomColorsState ] = useState < CustomThemeColors > ( DEFAULT_CUSTOM_COLORS ) ;
63
63
const [ isLoading , setIsLoading ] = useState ( true ) ;
64
64
@@ -73,6 +73,10 @@ export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ childre
73
73
const themeMode = savedTheme as ThemeMode ;
74
74
setThemeState ( themeMode ) ;
75
75
await applyTheme ( themeMode , customColors ) ;
76
+ } else {
77
+ // No saved preference: apply gray as the default theme
78
+ setThemeState ( 'gray' ) ;
79
+ await applyTheme ( 'gray' , customColors ) ;
76
80
}
77
81
78
82
// Load custom colors
@@ -181,4 +185,4 @@ export const useThemeContext = () => {
181
185
throw new Error ( 'useThemeContext must be used within a ThemeProvider' ) ;
182
186
}
183
187
return context ;
184
- } ;
188
+ } ;
You can’t perform that action at this time.
0 commit comments