ChadNext - Quick Starter Template for your Next project includes Next.js 14 App router, Shadcn UI, LuciaAuth, Prisma, Server Actions, Stripe, Internationalization and more.
Description:
When clicking the "Login" button, a dialog opens where users can enter their email. However, clicking the "x" button in the upper right corner of the dialog redirects users to the main page, which is not intuitive. Users would expect that closing the dialog would keep them on the same page.
Steps to Reproduce:
Navigate to any page other than the main page.
Click the "Login" button to open the login modal.
Click the "x" button in the upper right corner of the dialog.
Expected Behavior:
The dialog should close, and the user should remain on the current page.
Actual Behavior:
The dialog closes, and the user is redirected to the main page.
Suggested Solution:
Modify the behavior of the "x" button to use router.back() instead of router.push("/") to ensure users remain on the current page after closing the dialog.
Description: When clicking the "Login" button, a dialog opens where users can enter their email. However, clicking the "x" button in the upper right corner of the dialog redirects users to the main page, which is not intuitive. Users would expect that closing the dialog would keep them on the same page.
Steps to Reproduce:
Expected Behavior: The dialog should close, and the user should remain on the current page.
Actual Behavior: The dialog closes, and the user is redirected to the main page.
Suggested Solution: Modify the behavior of the "x" button to use
router.back()
instead ofrouter.push("/")
to ensure users remain on the current page after closing the dialog.