mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#26: suggest resend confirmation key in validation errors
This commit is contained in:
@@ -13,7 +13,7 @@ function resetTimer() {
|
||||
export default function AuthError({error, onClose = function() {}}) {
|
||||
resetTimer();
|
||||
|
||||
if (error.type === 'error.email_frequency') {
|
||||
if (error.payload && error.payload.canRepeatIn) {
|
||||
if (error.payload && error.payload.canRepeatIn) {
|
||||
error.payload.msLeft = error.payload.canRepeatIn * 1000;
|
||||
setTimeout(onClose, error.payload.msLeft - Date.now() + 1500); // 1500 to let the user see, that time is elapsed
|
||||
|
Reference in New Issue
Block a user