diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 10d53d2..dc62b14 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -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 ( -