Perplexica/src/components/Layout.tsx
2025-08-09 17:30:12 -06:00

18 lines
465 B
TypeScript

'use client';
import { useSelectedLayoutSegments } from 'next/navigation';
const Layout = ({ children }: { children: React.ReactNode }) => {
const segments = useSelectedLayoutSegments();
const isDashboard = segments.includes('dashboard');
return (
<main className="lg:pl-20 bg-bg min-h-screen">
<div className={isDashboard ? 'mx-4' : 'max-w-screen-lg lg:mx-auto mx-4'}>
{children}
</div>
</main>
);
};
export default Layout;