Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Close Login Modal Without Redirecting to Main Page #238

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

aliciusschroeder
Copy link
Contributor

Description:
This PR addresses the issue where closing the login modal redirects users to the main page. The change ensures that users remain on the current page after closing the dialog, providing a more intuitive user experience. This PR fixes #237

Changes:

  • Updated onOpenChange in LoginModal component to use router.back() instead of router.push("/").

Affected Files:

  • src/components/layout/login-modal.tsx

Testing:

  1. Navigate to any page other than the main page.
  2. Click the "Login" button to open the login modal.
  3. Click the "x" button in the upper right corner of the dialog.
  4. Verify that the dialog closes and the user remains on the current page.

Copy link

vercel bot commented Jul 3, 2024

@aliciusschroeder is attempting to deploy a commit to the Moinul Moin's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jul 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chadnext ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2024 1:09pm

Copy link
Owner

@moinulmoin moinulmoin left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution

@moinulmoin moinulmoin merged commit c6f0f37 into moinulmoin:main Jul 7, 2024
1 check 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.

Login Modal "Close" Button Redirects to Main Page Instead of Staying on the Current Page
2 participants