import ClientDashboard from "@/app/(dashboard)/dashboard/_clients/dashboard";
import PatientDashboard from "@/app/(dashboard)/dashboard/_patients/dashboard";
import {redirect} from "next/navigation";
import {LOGIN_URL} from "@/lib/constants";
import {useAuth} from "@/lib/hooks/useAuth";

export default async function Dashboard() {

    // todo missing implementation
    const {user} = await useAuth();
    if (!user) redirect(LOGIN_URL);

    // check if this is a client or a logged in customer
    // todo missing implementation
    const isClient = false;

    // todo missing implementation
    return (
        isClient ? <ClientDashboard user={user}/> : <PatientDashboard/>
    )
}