Skip to content

logout functionality fixed#186

Merged
Annanyatiwary4 merged 1 commit intoDevSyncx:mainfrom
prayagupa23:main
Oct 15, 2025
Merged

logout functionality fixed#186
Annanyatiwary4 merged 1 commit intoDevSyncx:mainfrom
prayagupa23:main

Conversation

@prayagupa23
Copy link
Contributor

🚀 Pull Request Checklist

Please ensure the following before requesting a review:

  • ✅ My issue is assigned to me, and I have not taken up another task simultaneously.
  • 🔁 I have pulled the latest changes from the main branch.
  • 🧪 My code is tested and does not break existing functionality.
  • 📚 I have added/updated documentation wherever necessary.
  • 🧹 My code follows the project’s coding standards.
  • ✍️ My commits are clear and meaningful.
  • 🧾 I have linked the issue this PR addresses with Closes #<issue_number>.

📌 Related Issue

Closes #183

🧠 Description

Fixes the broken “Logout” action in the Dashboard profile dropdown. Previously, clicking “Logout” attempted to navigate to /logout (non-existent route), which didn’t clear the user’s session and caused confusion. The new behavior explicitly clears the JWT and redirects to the Login screen.

  • Updated frontend/src/Components/DashBoard/Topbar.jsx:
  • Added handleLogout() to remove localStorage.token and navigate("/login").
  • Hooked the dropdown “Logout” item to this handler.
    Result: Logout now reliably signs the user out and returns them to the login page.

✅ Type of Change

  • 🐞 Bug fix
  • 💡 Feature
  • 🧹 Code cleanup/refactor
  • 🧪 Test cases
  • 📚 Docs update

📝 Additional Notes (Optional)

nil

@Annanyatiwary4

@vercel
Copy link

vercel bot commented Oct 15, 2025

@prayagupa23 is attempting to deploy a commit to the Annanya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

🙌 Thanks @prayagupa23 for raising this PR!
Our team will review it soon ⏳ — meanwhile, please make sure your PR follows our contributing guidelines 👉 Contributing Guidelines 🎉

@Annanyatiwary4 Annanyatiwary4 merged commit aa1814d into DevSyncx:main Oct 15, 2025
1 of 2 checks passed
@github-actions
Copy link

🎉🎉 Thank you for your contribution! Your PR #186 has been merged! 🎉🎉

@Annanyatiwary4 Annanyatiwary4 added enhancement New feature or request gssoc25 Only for Gssoc 25 contributors Level 1 Frontend hacktoberfest-accepted only for hacktoberfest 2025 candidate labels Oct 15, 2025
@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
devsync Ready Ready Preview Comment Oct 17, 2025 5:11pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Frontend gssoc25 Only for Gssoc 25 contributors hacktoberfest-accepted only for hacktoberfest 2025 candidate Level 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Logout functionality not working from profile dropdown on dashboard

2 participants

Comments