Skip to content

Commit 676a974

Browse files
chore: fix things
1 parent 24bd380 commit 676a974

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

apps/sim/app/(auth)/login/login-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export default function LoginPage({
174174
callbackURL: safeCallbackUrl,
175175
},
176176
{
177-
onError: (ctx) => {
177+
onError: (ctx: any) => {
178178
logger.error('Login error:', ctx.error)
179179

180180
if (ctx.error.code?.includes('EMAIL_NOT_VERIFIED')) {

apps/sim/app/(auth)/signup/signup-form.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ function SignupFormContent({
420420
? 'grid-rows-[1fr]'
421421
: 'grid-rows-[0fr]'
422422
)}
423-
aria-live='polite'
423+
aria-live={showNameValidationError && nameErrors.length > 0 ? 'polite' : 'off'}
424424
>
425425
<div className='overflow-hidden'>
426426
<div className='mt-1 space-y-1 text-red-400 text-xs'>
@@ -459,7 +459,12 @@ function SignupFormContent({
459459
? 'grid-rows-[1fr]'
460460
: 'grid-rows-[0fr]'
461461
)}
462-
aria-live='polite'
462+
aria-live={
463+
(showEmailValidationError && emailErrors.length > 0) ||
464+
(emailError && !showEmailValidationError)
465+
? 'polite'
466+
: 'off'
467+
}
463468
>
464469
<div className='overflow-hidden'>
465470
<div className='mt-1 space-y-1 text-red-400 text-xs'>
@@ -512,7 +517,7 @@ function SignupFormContent({
512517
? 'grid-rows-[1fr]'
513518
: 'grid-rows-[0fr]'
514519
)}
515-
aria-live='polite'
520+
aria-live={showValidationError && passwordErrors.length > 0 ? 'polite' : 'off'}
516521
>
517522
<div className='overflow-hidden'>
518523
<div className='mt-1 space-y-1 text-red-400 text-xs'>

0 commit comments

Comments
 (0)