Working on the Organization side.

This commit is contained in:
charlesgauthereau
2025-07-26 14:43:59 +02:00
parent f7cd169090
commit f8f599e4dd
27 changed files with 685 additions and 119 deletions
@@ -4,13 +4,12 @@ import {notFound} from "next/navigation";
import {OrganizationForm} from "@/components/wrappers/dashboard/organization/OrganizationForm/OrganizationForm";
import {getOrganization} from "@/lib/auth/auth";
export default async function RoutePage(props: PageParams<{
}>) {
const organization = await getOrganization({});
if (!organization) {
if (!organization || organization.slug == "default") {
notFound();
}
+1 -1
View File
@@ -2,7 +2,7 @@ import React from "react";
import {redirect} from "next/navigation";
import {SidebarInset, SidebarProvider} from "@/components/ui/sidebar";
import {AppSidebar} from "@/components/wrappers/dashboard/sideBar/app-sidebar";
import {AppSidebar} from "@/components/wrappers/dashboard/common/sidebar/app-sidebar";
import {Header} from "@/features/layout/Header";
import {currentUser} from "@/lib/auth/current-user";
+1 -1
View File
@@ -6,7 +6,7 @@ export default async function Index() {
const user = await currentUser();
if (user) {
const currentOrganizationSlug = await getCurrentOrganizationSlug();
redirect(`/dashboard/${currentOrganizationSlug}/projects`);
redirect(`/dashboard/home`);
}
redirect("/login");
//Do not delete