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={{
justifyContent: 'center',
alignItems: 'center',
mt: 1.5,
mt: 2.5,
}}
>
<Typography variant="body1">{t('verify.resendCodeIn')}</Typography>
<Button
variant="text"
loading={smsResendLoading || emailResendLoading}
sx={{ width: 'auto' }}
onClick={canResend ? handleResendOTPCode : undefined}
<Typography
variant="body1"
sx={{ color: 'primary.main', marginInlineStart: 1 }}
>
{canResend && t('verify.resendCode')}
{!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>
);

View File

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

View File

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