migration

This commit is contained in:
Théo LAGACHE
2025-05-16 15:54:17 +02:00
parent 01019fe1a3
commit 6f2523e524
285 changed files with 15492 additions and 46090 deletions
+13 -19
View File
@@ -1,37 +1,31 @@
import React from "react";
import {redirect} from "next/navigation";
import { redirect } from "next/navigation";
import {SidebarInset, SidebarProvider} from "@/components/ui/sidebar"
import {AppSidebar} from "@/components/wrappers/dashboard/sideBar/app-sidebar";
import {currentUser, requiredCurrentUser} from "@/auth/current-user";
import {Header} from "@/features/layout/Header";
import {prisma} from "@/prisma";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { AppSidebar } from "@/components/wrappers/dashboard/sideBar/app-sidebar";
import { Header } from "@/features/layout/Header";
import { currentUser } from "@/lib/auth/current-user";
export default async function Layout({ children }: { children: React.ReactNode }) {
const user = await currentUser();
export default async function Layout({children}: { children: React.ReactNode }) {
const user = await requiredCurrentUser()
if (!user) redirect('/login')
if (!user) redirect("/login");
return (
// <HydrationZustand>
// <GlobalStoreProvider>
<>
<SidebarProvider>
<div className="flex flex-col lg:flex-row w-full">
<AppSidebar/>
<AppSidebar />
<SidebarInset>
<Header/>
<main className="h-full">
{children}
</main>
<Header />
<main className="h-full">{children}</main>
</SidebarInset>
</div>
</SidebarProvider>
</>
// </GlobalStoreProvider>
// </HydrationZustand>
)
}
);
}