File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ const NormalLogin = ({
464
464
type = "button"
465
465
className = "flex gap-2 justify-center items-center w-full text-sm"
466
466
onClick = { handleGoogleSignIn }
467
- disabled = { loading }
467
+ disabled = { loading || emailSent }
468
468
>
469
469
< Image src = "/google.svg" alt = "Google" width = { 16 } height = { 16 } />
470
470
Login with Google
@@ -489,7 +489,7 @@ const NormalLogin = ({
489
489
className = "w-full"
490
490
layout
491
491
onClick = { ( ) => setShowOrgInput ( true ) }
492
- disabled = { loading }
492
+ disabled = { loading || emailSent }
493
493
>
494
494
< LucideArrowUpRight size = { 20 } />
495
495
Login with SAML SSO
Original file line number Diff line number Diff line change @@ -137,6 +137,14 @@ const StepOne = ({
137
137
emailId : string ;
138
138
} ) => {
139
139
const videoId = useParams ( ) . videoId ;
140
+ const handleGoogleSignIn = ( ) => {
141
+ trackEvent ( "auth_started" , { method : "google" , is_signup : true } ) ;
142
+ setLoading ( true ) ;
143
+ signIn ( "google" , {
144
+ redirect : false ,
145
+ callbackUrl : `${ window . location . origin } /s/${ videoId } ` ,
146
+ } ) ;
147
+ } ;
140
148
return (
141
149
< form
142
150
onSubmit = { async ( e ) => {
@@ -178,7 +186,7 @@ const StepOne = ({
178
186
autoComplete = "email"
179
187
required
180
188
value = { email }
181
- disabled = { emailSent }
189
+ disabled = { emailSent || loading }
182
190
onChange = { ( e ) => {
183
191
setEmail ( e . target . value ) ;
184
192
} }
@@ -205,15 +213,7 @@ const StepOne = ({
205
213
variant = "gray"
206
214
type = "button"
207
215
className = "flex gap-2 justify-center items-center my-1 w-full text-sm"
208
- onClick = { ( ) => {
209
- trackEvent ( "auth_started" , { method : "google" , is_signup : true } ) ;
210
- setLoading ( true ) ;
211
- signIn ( "google" , {
212
- redirect : false ,
213
- callbackUrl : `${ window . location . origin } /s/${ videoId } ` ,
214
- } ) ;
215
- setLoading ( false ) ;
216
- } }
216
+ onClick = { handleGoogleSignIn }
217
217
disabled = { loading }
218
218
>
219
219
< Image src = "/google.svg" alt = "Google" width = { 16 } height = { 16 } />
You can’t perform that action at this time.
0 commit comments