mirror of
https://github.com/dyzulk/trustlab.git
synced 2026-01-26 05:25:36 +07:00
feat(web): change default theme to DARK
This commit is contained in:
@@ -16,12 +16,12 @@ const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
|
||||
export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({
|
||||
children,
|
||||
}) => {
|
||||
const [theme, setThemeState] = useState<Theme>("system");
|
||||
const [theme, setThemeState] = useState<Theme>("dark");
|
||||
const [isInitialized, setIsInitialized] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const savedTheme = localStorage.getItem("theme") as Theme | null;
|
||||
const initialTheme = savedTheme || "system";
|
||||
const initialTheme = savedTheme || "dark";
|
||||
setThemeState(initialTheme);
|
||||
setIsInitialized(true);
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user