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";
|
|
|
|
|
2024-06-24 18:16:55 -04:00
|
|
|
const SettingsLayout = async ({
|
|
|
|
children
|
|
|
|
} : {
|
|
|
|
children:React.ReactNode
|
|
|
|
} ) => {
|
2023-12-31 05:41:55 -05:00
|
|
|
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>
|
2024-06-24 18:16:55 -04:00
|
|
|
<main className={"md:pl-[250px] h-full"}>
|
2023-12-31 05:41:55 -05:00
|
|
|
{children}
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SettingsLayout;
|