import ProjectListSideBar from '@/components/project-sidebar/ProjectListSideBar'; import { Suspense } from 'react'; import Loading from '@/components/ui/Loading'; import { sessionUser } from '@/auth'; import { redirect } from 'next/navigation'; interface ChatLayoutProps { children: React.ReactNode; } export default async function Layout({ children }: ChatLayoutProps) { const { isAdmin } = await sessionUser(); if (!isAdmin) { redirect('/'); } return (
}>
}>
{children}
); }