2023-12-31 05:41:55 -05:00
|
|
|
import SettingsNavigation from "@/components/navigation/settings";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
import { headers } from 'next/headers';
|
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
const SettingsLayout = async (
|
|
|
|
{ children } : { children:React.ReactNode } ) => {
|
|
|
|
const headersList = headers();
|
|
|
|
const header_url = headersList.get('x-url') || "";
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="h-full">
|
2024-01-02 12:59:06 -05:00
|
|
|
<div className={cn("hidden md:flex h-full w-[250px] z-30 flex-col fixed inset-y-0",
|
|
|
|
header_url.endsWith("/settings") && "flex h-full w-full md:w-[250px] z-30 flex-col fixed inset-y-0")}>
|
2023-12-31 05:41:55 -05:00
|
|
|
<SettingsNavigation />
|
|
|
|
</div>
|
|
|
|
<main className={cn("md:pl-[250px] h-full", header_url.endsWith("/settings") && "hidden")}>
|
|
|
|
{children}
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SettingsLayout;
|