diff --git a/index.html b/index.html index 1513e72..0ebfbae 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,20 @@ + (initialState); export function ThemeProvider({ children, - defaultTheme = "system", storageKey = "vite-ui-theme", }: ThemeProviderProps) { const [theme, setTheme] = useState( - () => (localStorage.getItem(storageKey) as Theme) || defaultTheme, + () => (localStorage.getItem(storageKey) as Theme) || "system", ); useEffect(() => { diff --git a/src/main.tsx b/src/main.tsx index cb43a75..4bf04b5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -11,7 +11,7 @@ const queryClient = new QueryClient(); ReactDOM.createRoot(document.getElementById("root")!).render( - +