From 5dcb2e6385617a439e2edcd220dd43eace5a2303 Mon Sep 17 00:00:00 2001 From: shivansh-bhatnagar18 Date: Tue, 16 Jan 2024 16:18:51 +0530 Subject: [PATCH 1/3] Better handling of the modal --- src/components/register.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/register.tsx b/src/components/register.tsx index 333a642..e8cfcc0 100644 --- a/src/components/register.tsx +++ b/src/components/register.tsx @@ -61,6 +61,7 @@ const Register = () => { } else if (errorData.username) { // Only username conflict setModalContent(errorData.username); + console.log(errorData.username); } else if (errorData.email) { // Only email conflict setModalContent(errorData.email); @@ -84,7 +85,7 @@ const Register = () => { const handleModalClose = () => { setShowModal(false); if (modalContent === 'Verification link has been sent by email!') { - Router.push('https://ca-frontend-ebon.vercel.app/'); + Router.push('/'); } }; @@ -286,7 +287,7 @@ const Register = () => {

{modalContent}