Skip to content

Commit

Permalink
Fix mobile menu in landing page (#3829)
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira authored Jul 22, 2024
1 parent 8189dfc commit a195c6a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/src/components/landing-core/ToolpadDashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ const NAVIGATION: Navigation = [
},
];

function DashboardLayoutBasic() {
interface DemoProps {
window?: () => Window;
}

function DashboardLayoutBasic(props: DemoProps) {
const { window } = props;

const [pathname, setPathname] = React.useState('/page');

const router = React.useMemo<Router>(() => {
Expand All @@ -147,8 +153,10 @@ function DashboardLayoutBasic() {
};
}, [pathname]);

const demoWindow = window !== undefined ? window() : undefined;

return (
<AppProvider navigation={NAVIGATION} router={router}>
<AppProvider navigation={NAVIGATION} router={router} window={demoWindow}>
<DashboardLayout>
<Box
sx={{
Expand Down

0 comments on commit a195c6a

Please sign in to comment.