feat(dashboard): Reflow differently. This is probably just a stop-gap until we get fully resizing widgets implemented.
This commit is contained in:
parent
d1883b339a
commit
3d6aa983dc
2 changed files with 16 additions and 2 deletions
|
|
@ -1,7 +1,16 @@
|
|||
'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-light-primary dark:bg-dark-primary min-h-screen">
|
||||
<div className="max-w-screen-lg lg:mx-auto mx-4">{children}</div>
|
||||
<div className={isDashboard ? "mx-4" : "max-w-screen-lg lg:mx-auto mx-4"}>
|
||||
{children}
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue