diff --git a/client/src/layouts/DashboardLayout.tsx b/client/src/layouts/DashboardLayout.tsx index db7986e..c99ee13 100644 --- a/client/src/layouts/DashboardLayout.tsx +++ b/client/src/layouts/DashboardLayout.tsx @@ -75,6 +75,14 @@ function DashboardLayout() { const [navbarOpen, setNavbarOpen] = useState(true) + useEffect(() => { + if (colorScheme === 'dark') { + document.body.dataset.agThemeMode = 'dark' + } else { + document.body.dataset.agThemeMode = 'light' + } + }, [colorScheme]) + return (
@@ -103,7 +111,7 @@ function DashboardLayout() { {!authStore.isAuthenticated && } onClick={() => navigate('/auth/signin')}>Войти} - + : } onClick={() => colorScheme === 'dark' ? setColorScheme('light') : setColorScheme('dark')}>Тема: {colorScheme === 'dark' ? 'тёмная' : 'светлая'} {authStore.isAuthenticated && } onClick={() => navigate('/settings')}>Настройки профиля} {authStore.isAuthenticated && } onClick={() => {