Skip to content

Conversation

@pratyushjha06
Copy link
Contributor

Pull Requests Review Criteria

Caution

PRs that fail to meet these review standards will be automatically flagged and may be rejected by maintainers.

  • Filled out this PR template properly
  • Did not commit directly to main
  • Limited commits (max 3–4 unless permitted by Admin/Mentors)
  • Added comments in complex parts of code

Closes: #1357

Describe the add-ons or changes you've made 📃

  1. Uncommented and implemented onLogout function in useSidebar hook
  2. Integrated with existing useAuth hook for proper state management
  3. Fixed handleClick logic in SidebarMenuItem to check onClick first before path
  4. Added redirect to /login after logout

Changes

  • shared/components/organisms/sidebar/hooks/index.ts - Added onLogout using useAuth
  • shared/components/organisms/sidebar/components/SidebarMenuItem.tsx - Fixed onClick

Screenshots 📷

16-41-00.-.Trim.mp4

Note to reviewers (Optional) 📄

@vercel
Copy link

vercel bot commented Jan 24, 2026

@pratyushjha06 is attempting to deploy a commit to the avdheshvarshney's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

setShowExpandedView(false);
}, []);

const onLogout = useCallback(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to write a separate function for logout.

Just pass the logout to onClick parameter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Revert the changes of this file. These are not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Revert the changes of this file. These are not required.

Done

@vercel
Copy link

vercel bot commented Jan 25, 2026

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

Project Deployment Review Updated (UTC)
code-a2z Ready Ready Preview, Comment Jan 25, 2026 9:36am

Copy link
Collaborator

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

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

Hey @pratyushjha06, Why have you added new lines in file? (This breaks formatting)

Great work. PR Approved 🎉

@Avdhesh-Varshney Avdhesh-Varshney merged commit 1e0baf2 into Code-A2Z:main Jan 25, 2026
2 of 4 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.

Logout button on Home screen not working

2 participants