mirror of
https://gitlab.massbug.com/massbug/judge4c.git
synced 2025-07-04 15:32:09 +00:00
feat(dashboard): add user authentication and integrate CreateWorkspaceForm
This commit is contained in:
parent
cc1f37633c
commit
9729e2d8a0
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user