import {PageParams} from "@/types/next"; import {Page, PageContent, PageTitle} from "@/features/layout/page"; import {notFound} from "next/navigation"; import {UserForm} from "@/components/wrappers/dashboard/profile/user-form/user-form"; import {Badge} from "@/components/ui/badge"; import {ButtonDeleteAccount} from "@/components/wrappers/dashboard/profile/button-delete-account/button-delete-account"; import {AvatarWithUpload} from "@/components/wrappers/dashboard/profile/avatar/avatar-with-upload"; import {currentUser} from "@/lib/auth/current-user"; import {getAccounts, getSessions} from "@/lib/auth/auth"; export default async function RoutePage(props: PageParams<{}>) { const user = await currentUser(); console.log("my user",user); if (!user) { return notFound(); } if (user.role !== "user" && user.role !== "admin" && user.role !== "superadmin") { return notFound(); } const sessions = await getSessions(); const accounts = await getAccounts(); return (
{user.name} {user.role} {/**/} {/* */} {/**/}
{/*
*/} {/* */} {/*
*/}
); }