fix: submit with enter in enter password form

This commit is contained in:
Koosha Lahouti
2025-09-24 12:00:40 +03:30
parent 3e4fc1960f
commit ef4085de6e

View File

@@ -142,7 +142,16 @@ export const EnterPasswordForm = ({
</LTRBox>
</Button>
</Box>
<Box
component="form"
onSubmit={(e) => {
e.preventDefault();
e.stopPropagation();
if (!loginWithPassLoading) {
void handleSubmit();
}
}}
>
<Typography variant="body2" color="textSecondary" sx={{ mt: 1, mb: 2 }}>
{t('enterPassword.enterThePasswordYouSetForYourAccount')}
</Typography>
@@ -190,13 +199,16 @@ export const EnterPasswordForm = ({
</Button>
<Stack spacing={1}>
<Button loading={loginWithPassLoading} onClick={handleSubmit}>
<Button loading={loginWithPassLoading}>
{t('verify.confirmAndLogin')}
</Button>
<Link to="/forget-password">
<Button variant="text">{t('enterPassword.iForgotMyPassword')}</Button>
<Button variant="text">
{t('enterPassword.iForgotMyPassword')}
</Button>
</Link>
</Stack>
</Box>
</AuthenticationCard>
);
};