feat(dashboard): add user authentication and integrate CreateWorkspaceForm

This commit is contained in:
ngc2207 2025-02-04 13:51:56 +08:00
parent cc1f37633c
commit 9729e2d8a0

View File

@ -1,12 +1,15 @@
export default function DashboardPage() { import { redirect } from "next/navigation";
import { getCurrent } from "@/features/auth/actions";
import { CreateWorkspaceForm } from "@/features/workspaces/components/create-workspace-form";
export default async function DashboardPage() {
const user = await getCurrent();
if (!user) redirect("/sign-in");
return ( return (
<div className="h-full flex flex-col gap-4"> <div className="h-full p-4">
<div className="grid auto-rows-min gap-4 md:grid-cols-3"> <CreateWorkspaceForm />
<div className="aspect-video rounded-xl bg-muted/50" />
<div className="aspect-video rounded-xl bg-muted/50" />
<div className="aspect-video rounded-xl bg-muted/50" />
</div>
<div className="min-h-[100vh] flex-1 rounded-xl bg-muted/50 md:min-h-min" />
</div> </div>
); );
} }