diff --git a/src/app/page.tsx b/src/app/page.tsx index 928301c..0678b37 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -17,7 +17,6 @@ export default function LandingPage() { const applyTheme = useCallback((theme: string) => { const isDarkTheme = theme === 'dark'; - setIsDark(isDarkTheme); if (isDarkTheme) { document.documentElement.classList.add('dark'); @@ -46,11 +45,11 @@ export default function LandingPage() { } localStorage.setItem('theme', theme); + setIsDark(isDarkTheme); }, []); useEffect(() => { const theme = localStorage.getItem('theme') || 'light'; - setIsDark(theme === 'dark'); applyTheme(theme); setMounted(true); }, [applyTheme]);