/** * File: layout.tsx * Created by: AI Assistant * Date: 2025-11-29 * Purpose: Dashboard layout for kreatiVortex platform * Part of: kreatiVortex - Platform Pembelajaran Tari Online */ import { ReactNode } from 'react'; import { DashboardProfile, DashboardMenu } from '@/components/Layouts'; import { auth } from '@/lib/auth'; import { headers } from 'next/headers'; import { redirect } from 'next/navigation'; import { prisma } from '@/lib/prisma'; export default async function DashboardLayout({ children, }: { children: ReactNode; }) { const session = await auth.api.getSession({ headers: await headers() }); if (!session) { redirect('/auth/signin'); } const menus = await prisma.menu.findMany({ where: { parentId: null, isActive: true, }, select: { id: true, name: true, slug: true, children: { where: { isActive: true, }, select: { id: true, name: true, slug: true, }, }, }, orderBy: { createdAt: 'asc', }, }); return (

KreatiVortex

{children}
); }