Skip to content

fix: correct sidebar logout behavior#417

Merged
KaranUnique merged 1 commit into
Canopus-Labs:mainfrom
guruprasad06:fix-logout
Jul 9, 2026
Merged

fix: correct sidebar logout behavior#417
KaranUnique merged 1 commit into
Canopus-Labs:mainfrom
guruprasad06:fix-logout

Conversation

@guruprasad06

Copy link
Copy Markdown
Contributor

📝 Pull Request Description

Related Issue

Closes #379

Summary

Fixed the sidebar Logout functionality to ensure users are logged out correctly and redirected to the landing page instead of encountering a Not Found page.

Changes made:

-Updated the sidebar logout button to use the same logout flow as the profile logout button.
-Added a backend logout API call before clearing user data.Cleared both localStorage and sessionStorage after logout.
-Cleared the authenticated user from the context.
-Redirected users to the landing page (/) after successful logout.


Type of Change

  • [ X ] 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature
  • ♻️ Refactoring
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • 🔥 Other(please describe) ______

How Has This Been Tested?

-Logged into the application using valid credentials.
-Clicked the Logout button from the sidebar.
-Verified that the user was logged out successfully.
-Confirmed that the application redirected to the landing page without showing a "Not Found" page.


Screenshots (if applicable)

Before: it shows page not found 404 error
image

After : it logs out succesfully
Screenshot 2026-07-09 130044
Screenshot 2026-07-09 130109


Checklist

  • [ X ] My code follows the project's guidelines
  • [ X ] I have tested my changes
  • I have updated documentation where necessary
  • [ X ] I have linked the related issue
  • [ X ] My changes do not introduce new warnings or errors

@guruprasad06

Copy link
Copy Markdown
Contributor Author

Sir /Mam ,
could you add the tag of essoc 26

@KaranUnique KaranUnique merged commit 7ad1481 into Canopus-Labs:main Jul 9, 2026
1 check 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.

[Bug]: "Not Found" error after clicking Logout

2 participants