Merge pull request #36 from rkheftan/fix/submit-form
fix: submit with enter in enter password form
This commit is contained in:
@@ -142,7 +142,16 @@ export const EnterPasswordForm = ({
|
|||||||
</LTRBox>
|
</LTRBox>
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box
|
||||||
|
component="form"
|
||||||
|
onSubmit={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
if (!loginWithPassLoading) {
|
||||||
|
void handleSubmit();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Typography variant="body2" color="textSecondary" sx={{ mt: 1, mb: 2 }}>
|
<Typography variant="body2" color="textSecondary" sx={{ mt: 1, mb: 2 }}>
|
||||||
{t('enterPassword.enterThePasswordYouSetForYourAccount')}
|
{t('enterPassword.enterThePasswordYouSetForYourAccount')}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -190,13 +199,16 @@ export const EnterPasswordForm = ({
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Stack spacing={1}>
|
<Stack spacing={1}>
|
||||||
<Button loading={loginWithPassLoading} onClick={handleSubmit}>
|
<Button loading={loginWithPassLoading}>
|
||||||
{t('verify.confirmAndLogin')}
|
{t('verify.confirmAndLogin')}
|
||||||
</Button>
|
</Button>
|
||||||
<Link to="/forget-password">
|
<Link to="/forget-password">
|
||||||
<Button variant="text">{t('enterPassword.iForgotMyPassword')}</Button>
|
<Button variant="text">
|
||||||
|
{t('enterPassword.iForgotMyPassword')}
|
||||||
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</Box>
|
||||||
</AuthenticationCard>
|
</AuthenticationCard>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user