Presupuestador_web/client/src/app/quotes/layout.tsx

24 lines
641 B
TypeScript
Raw Normal View History

import { Layout, LayoutContent, LayoutHeader, ProtectedRoute } from "@/components";
2024-06-29 19:39:25 +00:00
import { PropsWithChildren } from "react";
import { Outlet, useLocation } from "react-router-dom";
2024-06-29 19:39:25 +00:00
import { QuotesProvider } from "./QuotesContext";
export const QuotesLayout = ({ children }: PropsWithChildren) => {
const location = useLocation();
const isEditing = location.pathname.includes("/edit");
return (
<ProtectedRoute>
<QuotesProvider>
<Layout>
<LayoutHeader />
<LayoutContent>
2024-09-16 09:13:06 +00:00
<Outlet />
</LayoutContent>
</Layout>
</QuotesProvider>
</ProtectedRoute>
);
2024-06-29 19:39:25 +00:00
};