#26: suggest resend confirmation key in validation errors

This commit is contained in:
SleepWalker
2016-05-22 18:16:51 +03:00
parent 24fbde289f
commit 87d48c8722
8 changed files with 88 additions and 40 deletions

View File

@@ -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