Closed margaretmwaura closed 1 year ago
Regarding the duplication mentioned above, just refactor to something like this:
// extract the close behavior into a separate function
const closeNavbar = () => setNavbar(false);
// remove the legacyBehavior prop & add the event handlers to the Next link
<NextLink
href="..."
className="..."
onClick={closeNavbar}
onKeyPress={closeNavbar}
>
{t('app:navbar.projects')}
</NextLink>
Other tasks:
@margaretmwaura How's it going?
@margaretmwaura How's it going?
Will give an update to this by EOD
Regarding the duplication mentioned above, just refactor to something like this:
// extract the close behavior into a separate function const closeNavbar = () => setNavbar(false); // remove the legacyBehavior prop & add the event handlers to the Next link <NextLink href="..." className="..." onClick={closeNavbar} onKeyPress={closeNavbar} > {t('app:navbar.projects')} </NextLink>
Other tasks:
- add a transparent border on the open/close button to stop the layout shift it gets when focused
- the (a & button) elements in the mobile menu need to be styled for mobile as well
Hi @dastrong , this has helped, thank you, you can review again
- pasting the same piece of code on 5 different places is code duplication, which should be prevented where possible. @Xazin Do you perhaps have a suggestion on how Margaret could fix this?
- Decreasing screen width now yields the image below instead of the burger in the top right corner
This has been resolved, kindly review again
Looks good to me! what do you think @dastrong ?
@dastrong
@dastrong
Yup, LGTM.
The latest updates on your projects. Learn more about Vercel for Git ↗︎