Fix scrollbar

This commit is contained in:
prayag17 committed 2023-04-10 16:03:21 +05:30
1 parent 45655b7464
commit 0d3b7c855c
9 files changed
+65 -107

No files matched your search

+9 -6
View File
@@ -7,7 +7,7 @@ import IconButton from "@mui/material/IconButton";
import Toolbar from "@mui/material/Toolbar";
import Avatar from "@mui/material/Avatar";
import Box from "@mui/material/Box";
import Zoom from "@mui/material/Zoom";
import useScrollTrigger from "@mui/material/useScrollTrigger";
import { MdiMagnify } from "../icons/mdiMagnify";
import { theme } from "../../theme";
@@ -44,6 +44,11 @@ export const AppBar = () => {
},
});
const trigger = useScrollTrigger({
disableHysteresis: true,
threshold: 0,
});
useEffect(() => {
if (location.pathname == "/home") {
dispatch(hideBackButton());
@@ -54,13 +59,11 @@ export const AppBar = () => {
visible && (
<MuiAppBar
sx={{
width: `calc(100vw - ${theme.spacing(7)} - 10px)`,
width: `calc(100vw - ${theme.spacing(7)})`,
// mr: "10px",
background: "transparent",
backgroundColor: "transparent",
}}
className={
backdropVisible ? "appBar backdropVisible" : "appBar"
}
className={trigger ? "appBar backdropVisible" : "appBar"}
elevation={backdropVisible ? 6 : 0}
>
<Toolbar sx={{ justifyContent: "space-between" }}>