@@ -97,22 +97,23 @@ const SignupPage = () => {
9797 setIsSubmitting ( false ) ;
9898 } ;
9999
100- return < div className = "w-screen flex flex-col gap-4 justify-center -translate-y-12 items-center h-screen bg-gray-100" >
100+ return (
101+ < div className = "w-screen flex flex-col gap-4 justify-center -translate-y-12 items-center h-screen bg-gray-100" >
101102 < Logo />
102103 < Card className = "flex flex-col items-center text-center p-8" >
103104 < div className = "flex flex-col gap-4" >
104105 < h1 className = "text-xl font-semibold" > Sign up</ h1 >
105106 < h2 className = "text-sm text-slate-500" > Sign up to Course Matrix with your email</ h2 >
106107 < Form { ...signupForm } >
107108 < form onSubmit = { signupForm . handleSubmit ( onSubmit ) } className = "space-y-4" >
108- < FormField
109+ < FormField
109110 control = { signupForm . control }
110111 name = "username"
111112 render = { ( { field } ) => (
112113 < FormItem className = "text-left w-[400px]" >
113114 < FormLabel > Username</ FormLabel >
114115 < FormControl >
115- < Input { ...field } id = "UsernameInput" placeholder = "User123" />
116+ < Input { ...field } id = "UsernameInput" />
116117 </ FormControl >
117118 < FormMessage />
118119 </ FormItem >
@@ -130,18 +131,29 @@ const SignupPage = () => {
130131 < FormMessage />
131132 </ FormItem >
132133 ) }
133- < div className = "w-full flex flex-row justify-center" >
134- < Button
135- id = "LoginBtn"
136- className = "w-full"
137- type = "submit"
138- variant = { isSubmitting ? "ghost" : "default" }
139- >
140- Sign up
141- </ Button >
142- </ div >
143- </ form >
144- </ Form >
134+ />
135+ < PasswordInput
136+ form = { signupForm }
137+ name = "password"
138+ label = "Create Password"
139+ placeholder = "Enter password"
140+ className = "w-full"
141+ />
142+ < PasswordInput
143+ form = { signupForm }
144+ name = "confirmPassword"
145+ label = "Confirm Password"
146+ placeholder = "Confirm password"
147+ className = "w-full"
148+ />
149+ { showCheckEmail && < p className = "text-sm text-slate-500 w-[400px]" > Registration successful! Please check { signupForm . getValues ( "email" ) } for a confirmation link</ p > }
150+ { showUserExists && < p className = "text-sm text-red-500 w-[400px]" > User with email { signupForm . getValues ( "email" ) } already exists!</ p > }
151+ { showSignupError && < p className = "text-sm text-red-500 w-[400px]" > An unknown error occured. Please try again.</ p > }
152+ < div className = "w-full flex flex-row justify-center" >
153+ < Button id = "LoginBtn" className = "w-full" type = "submit" variant = { isSubmitting ? "ghost" : "default" } > Sign up</ Button >
154+ </ div >
155+ </ form >
156+ </ Form >
145157
146158 < Label
147159 id = "GogtoSignup"
0 commit comments