diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsx index a6d432f..40fa5e8 100644 --- a/src/components/layout/app-shell.tsx +++ b/src/components/layout/app-shell.tsx @@ -1,11 +1,16 @@ 'use client' +import dynamic from 'next/dynamic' import { usePathname } from 'next/navigation' import { useEffect, useState } from 'react' -import { Sidebar } from '@/components/dashboard/sidebar' import { useAuth } from '@/hooks/useAuth' +// Рендерим сайдбар только на клиенте, отключаем SSR, чтобы избежать гидратационных расхождений +const Sidebar = dynamic(() => import('@/components/dashboard/sidebar').then((m) => m.Sidebar), { + ssr: false, +}) + export function AppShell({ children }: { children: React.ReactNode }) { const pathname = usePathname() const { isAuthenticated, isLoading } = useAuth()