fix: recent timer button removed

This commit is contained in:
2025-08-20 23:39:21 +03:30
parent 882498637b
commit d56eb2e4ff
3 changed files with 48 additions and 24 deletions

View File

@@ -213,20 +213,28 @@ export function OtpVerifyForm({
sx={{ sx={{
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
mt: 1.5, mt: 2.5,
}} }}
> >
<Typography variant="body1">{t('verify.resendCodeIn')}</Typography> <Typography variant="body1">{t('verify.resendCodeIn')}</Typography>
<Button <Typography
variant="text" variant="body1"
loading={smsResendLoading || emailResendLoading} sx={{ color: 'primary.main', marginInlineStart: 1 }}
sx={{ width: 'auto' }}
onClick={canResend ? handleResendOTPCode : undefined}
> >
{canResend && t('verify.resendCode')}
{!canResend && `${formatTime(resendTimer)} ${t('verify.moreMinute')}`} {!canResend && `${formatTime(resendTimer)} ${t('verify.moreMinute')}`}
</Button> </Typography>
{canResend && (
<Button
variant="text"
loading={smsResendLoading || emailResendLoading}
sx={{ width: 'auto', p: 0 }}
onClick={canResend ? handleResendOTPCode : undefined}
>
{t('verify.resendCode')}
</Button>
)}
</Stack> </Stack>
</Stack> </Stack>
); );

View File

@@ -140,20 +140,28 @@ export function VerifyPhoneNumber({
sx={{ sx={{
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
mt: 1.5, mt: 2.5,
}} }}
> >
<Typography variant="body1">{t('verify.resendCodeIn')}</Typography> <Typography variant="body1">{t('verify.resendCodeIn')}</Typography>
<Button <Typography
variant="text" variant="body1"
loading={smsResendLoading} sx={{ color: 'primary.main', marginInlineStart: 1 }}
sx={{ width: 'auto' }}
onClick={canResend ? handleResendOTPCode : undefined}
> >
{canResend && t('verify.resendCode')}
{!canResend && `${formatTime(resendTimer)} ${t('verify.moreMinute')}`} {!canResend && `${formatTime(resendTimer)} ${t('verify.moreMinute')}`}
</Button> </Typography>
{canResend && (
<Button
variant="text"
loading={smsResendLoading}
sx={{ width: 'auto', p: 0 }}
onClick={canResend ? handleResendOTPCode : undefined}
>
{t('verify.resendCode')}
</Button>
)}
</Stack> </Stack>
</Stack> </Stack>
); );

View File

@@ -171,20 +171,28 @@ export function ForgetPasswordOtp({
sx={{ sx={{
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
mt: 1.5, mt: 2.5,
}} }}
> >
<Typography variant="body1">{t('verify.resendCodeIn')}</Typography> <Typography variant="body1">{t('verify.resendCodeIn')}</Typography>
<Button <Typography
variant="text" variant="body1"
loading={sendForgetPassCodeLoading} sx={{ color: 'primary.main', marginInlineStart: 1 }}
sx={{ width: 'auto' }}
onClick={canResend ? handleResendOTPCode : undefined}
> >
{canResend && t('verify.resendCode')}
{!canResend && `${formatTime(resendTimer)} ${t('verify.moreMinute')}`} {!canResend && `${formatTime(resendTimer)} ${t('verify.moreMinute')}`}
</Button> </Typography>
{canResend && (
<Button
variant="text"
loading={sendForgetPassCodeLoading}
sx={{ width: 'auto', p: 0 }}
onClick={canResend ? handleResendOTPCode : undefined}
>
{t('verify.resendCode')}
</Button>
)}
</Stack> </Stack>
</Stack> </Stack>
); );