import {ReactNode} from 'react' import Image from 'next/image' import logo from '@/assets/logo.webp' import Profile from '@/app/admin/_server/profile' import {merge} from '@/lib/utils' import Link from 'next/link' import {getProfile} from '@/actions/auth/auth' import {redirect} from 'next/navigation' export type DashboardLayoutProps = { children: ReactNode } export default async function DashboardLayout(props: DashboardLayoutProps) { const profile = await getProfile() if (!profile) { return redirect('/login') } return (
{props.label}
) } function NavItem(props: { href: string icon?: ReactNode label: string }) { return ( {props.icon} {props.label} ) }