Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions client/src/Components/layout/RootLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Sidebar } from "@/Components/sidebar";
import { Outlet } from "react-router";
import Stack from "@mui/material/Stack";
import { useMediaQuery } from "@mui/material";
import { useMediaQuery, useTheme } from "@mui/material";
import { useSidebar } from "@/Hooks/useSidebar";

import { useTheme } from "@mui/material";

const RootLayout = () => {
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
Expand All @@ -25,6 +23,9 @@ const RootLayout = () => {
: "rgba(0, 0, 0, 0.01)",
display: "flex",
alignItems: "center",
// TODO: confirm this matches the sidebar's actual expanded width.
// Currently hardcoded to theme.spacing(12); should likely use
// a value from useSidebar() the same way collapsedWidth is used above.
paddingLeft: isSmall ? `${collapsedWidth + 12}px` : 12,
}}
>
Expand Down
Loading