Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle Button Doesn't Close Automatically on Navbar Links Click (Mobile View) #103 #111

Conversation

kaali001
Copy link
Contributor

Describe the bug

In the mobile view of the website, the toggle button on the navbar fails to close automatically upon clicking any of the navbar links. This issue results in an inconvenience for users navigating the site on mobile devices as the navbar remains open, obstructing the view of the content.

So I have fixed this issue by making a new function to handle link clicks and close the menu as -

const handleLinkClick = () => {
        setMenuOpen(false);
    };

And added onClick handler to close the menu on each items of navbar.

Screenshots

Screenshot with issues -
image

Screenshot of fixed issues -
image

Checklist:

  • [ X] I have performed a self-review of my code
  • [ X] I have read and followed the Contribution Guidelines.
  • [ X] I have tested the changes thoroughly before submitting this pull request.
  • [X ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
  • [X ] I have commented my code, particularly in hard-to-understand areas.

Copy link

vercel bot commented May 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
time-warp ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 7:11am

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Our repository.🎊 Thank you so much for taking the time to point this out.

@kaali001 kaali001 changed the title Toggle Button Doesn't Close Automatically on Navbar Links Click (Mobile View) #97 Toggle Button Doesn't Close Automatically on Navbar Links Click (Mobile View) #103 May 23, 2024
@Akshatchaube01 Akshatchaube01 merged commit a8a1244 into Akshatchaube01:main May 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants