diff --git a/src/Pages/auth/Signup.tsx b/src/Pages/auth/Signup.tsx index fdc4d70..3ab62f7 100644 --- a/src/Pages/auth/Signup.tsx +++ b/src/Pages/auth/Signup.tsx @@ -68,7 +68,8 @@ const Signup: React.FC = () => { navigator('/'); return; } - + if(location.state.role){ + const signUpData: any = { role: location.state.role, email: response.payload.data.email, @@ -76,7 +77,6 @@ const Signup: React.FC = () => { username: response.payload.username, isGauth: true }; - if(location.state.role){ navigator(location.state.role === 'student' ? '/userRegister' : '/instructorRegister', { state: signUpData }); }else { toast.info('Please select the role !')