Skip to content

fix: handle protected footer navigation#753

Open
gitsofyash wants to merge 2 commits into
aryandas2911:mainfrom
gitsofyash:fix/public-footer-protected-links
Open

fix: handle protected footer navigation#753
gitsofyash wants to merge 2 commits into
aryandas2911:mainfrom
gitsofyash:fix/public-footer-protected-links

Conversation

@gitsofyash
Copy link
Copy Markdown

📌 Description

Fixed footer navigation for protected app routes. Footer links now use React Router navigation, logged-out users are redirected to the login page instead of Not Found, and route changes scroll to the top so the login form is visible immediately.

🔗 Related Issue

Closes #683

🛠 Changes Made

  • Replaced footer protected route anchors with React Router Link components.
  • Preserved the originally requested protected route and redirect users there after login.
  • Added route-change scroll reset so footer link redirects show the login form immediately.
  • Hardened auth token handling to avoid malformed stale tokens being attached to login/signup requests.

📸 Screenshots (if applicable)

N/A

✅ Checklist

  • Code runs locally
  • Followed project structure
  • No console errors
  • Properly tested changes
  • Linked the issue

🚀 Notes for Reviewers

Please review the protected footer navigation flow for logged-out users, especially Dashboard, Tasks, and Routine Builder redirects from the footer.

@gitsofyash
Copy link
Copy Markdown
Author

Hi @aryandas2911, I have resolved the merge conflicts and updated the branch.

The PR is ready for review. Could you please approve the workflow run so CI can start?

Verified locally:

  • npm.cmd run lint
  • npm.cmd run build

Thanks!

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.

Footer navigation links open protected routes as Not Found for logged-out users

1 participant