Preparing the repository

This commit is contained in:
charles-gauthereau
2025-01-01 20:00:11 +01:00
parent dd7050c8e0
commit 00a19bda35
14 changed files with 60 additions and 205 deletions
+4 -1
View File
@@ -1,11 +1,14 @@
import {redirect} from "next/navigation";
import {currentUser} from "@/auth/current-user";
import {getCurrentOrganizationSlug} from "@/features/dashboard/organization-cookie";
export default async function Index() {
const user = await currentUser()
if (user) {
redirect("/dashboard")
const currentOrganizationSlug = await getCurrentOrganizationSlug()
redirect(`/dashboard/${currentOrganizationSlug}/projects`)
}
redirect("/login")
//Do not delete