diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 855621a..87be31d 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -9,7 +9,12 @@ import MenuIcon from '@mui/icons-material/Menu'; import CloseIcon from '@mui/icons-material/Close'; import { SwipeableDrawer } from '@mui/material'; -const links = [ +interface LinkMetadata { + name: string; + href: string; +} + +const links: LinkMetadata[] = [ { name: 'Home', href: '/' }, { name: 'About', href: '/#about' }, { name: 'Impact', href: '/#impact' }, @@ -27,10 +32,13 @@ export default function Navbar() { const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const lastUpdate = useRef(0); - const onLinkClick = () => { + const onLinkClick = (link: LinkMetadata) => { lastUpdate.current = Date.now(); - setVisible(false); setMobileMenuOpen(false); + + if (link.name !== 'Home') { + setVisible(false); + } }; useEffect(() => { @@ -82,7 +90,12 @@ export default function Navbar() { {links.map(link => ( - + onLinkClick(link)} + key={link.name} + > {link.name} ))} @@ -104,7 +117,12 @@ export default function Navbar() { >
{links.map(link => ( - + onLinkClick(link)} + key={link.name} + > {link.name} ))} diff --git a/src/sections/Hero/style.module.scss b/src/sections/Hero/style.module.scss index 7daaa4d..461b07c 100644 --- a/src/sections/Hero/style.module.scss +++ b/src/sections/Hero/style.module.scss @@ -8,13 +8,13 @@ grid-template-columns: auto 1fr; align-items: flex-start; padding: 0 vars.$side-padding; - margin: 0 calc(vars.$side-padding * -1); + margin: 8rem calc(vars.$side-padding * -1); overflow: hidden; margin-bottom: -35rem; @media screen and (max-width: vars.$breakpoint-md) { padding: 0 vars.$side-padding-mobile; - margin: 0 calc(vars.$side-padding-mobile * -1); + margin: 6rem calc(vars.$side-padding-mobile * -1); } .text { diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 95a67c5..7bc3d55 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -19,11 +19,9 @@ html { body { padding: 0 vars.$side-padding; - margin-top: 8rem; @media screen and (max-width: vars.$breakpoint-md) { padding: 0 vars.$side-padding-mobile; - margin-top: 6rem; } }