fix: submit with enter in enter password form
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user