fixed margin causing app to scroll when it shouldn't

This commit is contained in:
Carter 2025-04-22 12:59:10 -06:00
parent e56c5f0781
commit ffa060cee8
3 changed files with 73 additions and 75 deletions

View file

@ -11,11 +11,12 @@ import SideNavigator from "navigation/SideNavigator";
import { useState } from "react"; import { useState } from "react";
import BottomNavigator from "navigation/BottomNavigator"; import BottomNavigator from "navigation/BottomNavigator";
const useStyles = makeStyles((theme: Theme) => ({ const useStyles = makeStyles((theme: Theme) => {
return ({
appBar: { appBar: {
zIndex: theme.zIndex.drawer + 1, zIndex: theme.zIndex.drawer + 1,
backgroundImage: "none", // This prevents de-saturation of header in dark mode backgroundImage: "none", // This prevents de-saturation of header in dark mode
backgroundColor: "#272727" backgroundColor: theme.palette.mode === "light" ? "#3b3b3b" : "#272727"
}, },
toolbar: { toolbar: {
marginLeft: theme.spacing(0.5), marginLeft: theme.spacing(0.5),
@ -74,8 +75,9 @@ const useStyles = makeStyles((theme: Theme) => ({
marginLeft: theme.spacing(3), marginLeft: theme.spacing(3),
marginRight: theme.spacing(2) marginRight: theme.spacing(2)
} }
}, }
})); })
});
export default function Header() { export default function Header() {

View file

@ -22,16 +22,16 @@ const reducer = (state: GlobalState, action: GlobalStateAction): GlobalState =>
const useStyles = makeStyles((theme: Theme) => ({ const useStyles = makeStyles((theme: Theme) => ({
appContent: { appContent: {
marginTop: 56, paddingTop: 56,
marginBottom: 56, paddingBottom: 56,
marginLeft: "0px", paddingLeft: "0px",
[theme.breakpoints.up("sm")]: { [theme.breakpoints.up("sm")]: {
marginTop: 64, paddingTop: 64,
marginBottom: 0 paddingBottom: 0,
}, },
[theme.breakpoints.up("md")]: { [theme.breakpoints.up("md")]: {
marginLeft: theme.spacing(9) paddingLeft: theme.spacing(9)
} },
}, },
container: { container: {
backgroundColor: theme.palette.background.default, backgroundColor: theme.palette.background.default,

View file

@ -329,10 +329,6 @@ export default function Router() {
<Route path="/logout" element={<Logout />} /> <Route path="/logout" element={<Logout />} />
<Route path="grainbags/:bagID" element={<GrainBag />} /> <Route path="grainbags/:bagID" element={<GrainBag />} />
{/*
<ErrorBoundary FallbackComponent={ErrorFallback}>
<Route path="*" element={<RelativeRoutes/>} />
</ErrorBoundary> */}
<Route path="*" element={<RelativeRoutes/>} /> <Route path="*" element={<RelativeRoutes/>} />