Skip to content

Commit

Permalink
header is rendered when user starts scrolling up
Browse files Browse the repository at this point in the history
Signed-off-by: Amelia-Maria Breda <ambreda@cisco.com>
  • Loading branch information
ameliamariabreda authored and raulkele committed Oct 28, 2022
1 parent 146f764 commit 26783e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.App {
text-align: center;
height: 100vh;
margin-top: 10vh;
}

.App-logo {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ function setNavShow() {

function Header() {
const show = setNavShow();
console.log(show);
const classes = useStyles();
const path = useLocation().pathname;
// const navigate = useNavigate();
Expand All @@ -137,7 +136,7 @@ function Header() {
setOpen(false);
};
return (
<AppBar position="sticky">
<AppBar position={show ? 'fixed' : 'absolute'} sx={{ height: '10vh' }}>
<Toolbar className={classes.header}>
<Stack direction="row" alignItems="center" justifyContent="space-between" sx={{ minWidth: '60%' }}>
<Grid container className={classes.grid}>
Expand Down

0 comments on commit 26783e6

Please sign in to comment.