2025-07-19 17:41:58 -06:00
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
import { useSelectedLayoutSegments } from 'next/navigation';
|
|
|
|
|
|
2024-04-09 16:21:05 +05:30
|
|
|
const Layout = ({ children }: { children: React.ReactNode }) => {
|
2025-07-19 17:41:58 -06:00
|
|
|
const segments = useSelectedLayoutSegments();
|
|
|
|
|
const isDashboard = segments.includes('dashboard');
|
|
|
|
|
|
2024-04-09 16:21:05 +05:30
|
|
|
return (
|
2024-05-27 11:49:09 +08:00
|
|
|
<main className="lg:pl-20 bg-light-primary dark:bg-dark-primary min-h-screen">
|
2025-07-21 23:49:09 -06:00
|
|
|
<div className={isDashboard ? 'mx-4' : 'max-w-screen-lg lg:mx-auto mx-4'}>
|
2025-07-19 17:41:58 -06:00
|
|
|
{children}
|
|
|
|
|
</div>
|
2024-04-09 16:21:05 +05:30
|
|
|
</main>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Layout;
|