hermes-web/app/settings/layout.tsx
2024-01-02 07:26:20 +00:00

24 lines
809 B
TypeScript

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">
<div className={cn("hidden md:flex h-full w-[250px] z-30 flex-col fixed inset-y-0", header_url.endsWith("/settings") && "md:flex h-full w-full z-30 flex-col fixed inset-y-0")}>
<SettingsNavigation />
</div>
{header_url}
<main className={cn("md:pl-[250px] h-full", header_url.endsWith("/settings") && "hidden")}>
{children}
</main>
</div>
);
}
export default SettingsLayout;