fix: naming and redundancy issues

This commit is contained in:
Sérgio Salgado 2021-04-06 00:39:52 +01:00 committed by Josh Harvey
parent fff9523988
commit 40974dd501
15 changed files with 194 additions and 143 deletions

View file

@ -78,10 +78,11 @@ const Reset2FA = () => {
})
const getErrorMsg = () => {
if (mutationError || queryError) return 'Internal server error'
if (queryError) return 'Internal server error'
if (twoFAConfirmation.length !== 6 && invalidToken)
return 'The code should have 6 characters!'
if (invalidToken) return 'Code is invalid. Please try again.'
if (mutationError || invalidToken)
return 'Code is invalid. Please try again.'
return null
}