Skip to content

Comments

Feat/footer-and-navbar#21

Merged
CMolinaBetancourt merged 5 commits intomainfrom
feat/footer_navbar
Nov 4, 2025
Merged

Feat/footer-and-navbar#21
CMolinaBetancourt merged 5 commits intomainfrom
feat/footer_navbar

Conversation

@CMolinaBetancourt
Copy link
Collaborator

🎯Type of Change:

  • Feat ✨: New functionality.

This PR...

Adds the navbar and footer options for a logged-in user.


📝 What I Did (Detailed Work):

List the main actions and changes made in bullet form. Focus on what was implemented.

  • In the Navbar component, I included a conditional that allows it to change its content and links based on whether the user is authenticated or not. It manages authentication by reading a token from localStorage and provides navigation links, "Log In" / "Sign Up" options, or a logout menu and a mobile menu.
  • In the MobileMenu component, I included the code for a side navigation menu for mobile devices. The menu is conditionally visible (isOpen), closes when a link or the close button is clicked, and shows links with icons to the Dashboard, Detox Challenge, and Profile sections for authenticated users.
  • In the Footer component, I included a conditional that allows it to change its content and links based on whether the user is authenticated or not.
  • In the Login component, I added line 21 localStorage.setItem('authToken', 'my-auth-token') to simulate a successful user authentication.

🧪 How to Test (Steps to Verify):

  1. Navigate to the Netlify preview for this PR.
  2. Review the navbar and footer for a non-authenticated user.
  3. Go to the login and enter a username and password. Validate that it is saved in local storage "fake test".
  4. Review and test the navbar and footer for a logged-in user, including the mobile hamburger menu option.
  5. Perform the logout and validate that the information is removed from local storage.

🤔 What I learned (gotchas):

How to perform login tests using localStorage, create a hamburger menu, and use React icons.

@netlify
Copy link

netlify bot commented Nov 3, 2025

Deploy Preview for mint-chip ready!

Name Link
🔨 Latest commit a996240
🔍 Latest deploy log https://app.netlify.com/projects/mint-chip/deploys/69090be39e49070008164b48
😎 Deploy Preview https://deploy-preview-21--mint-chip.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@nkabembo nkabembo left a comment

Choose a reason for hiding this comment

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

well done

Copy link
Collaborator

@magali-la magali-la left a comment

Choose a reason for hiding this comment

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

looks great, ready to merge!

@CMolinaBetancourt CMolinaBetancourt merged commit a3ea880 into main Nov 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants