- Reorganizes the components folder into ui, layout, features, shared, and providers for better modularity. - Groups routes in the app folder using a route group (auth). - Updates all imports to reflect the new file structure.
28 lines
814 B
TypeScript
28 lines
814 B
TypeScript
import type React from "react";
|
|
import ProtectedRoute from "@/components/shared/ProtectedRoute";
|
|
import { Sidebar } from "@/components/layout/sidebar";
|
|
import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar";
|
|
import { PagesHeader } from "@/components/features/dashboard/header";
|
|
|
|
export default function MainRoutesLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
console.log('[MAIN-ROUTES-LAYOUT] Layout do administrador carregado')
|
|
|
|
return (
|
|
<ProtectedRoute requiredUserType={["administrador"]}>
|
|
<div className="min-h-screen bg-background flex">
|
|
<SidebarProvider>
|
|
<Sidebar />
|
|
<main className="flex-1">
|
|
<PagesHeader />
|
|
{children}
|
|
</main>
|
|
</SidebarProvider>
|
|
</div>
|
|
</ProtectedRoute>
|
|
);
|
|
}
|