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

@ -71,10 +71,11 @@ const Input2FAState = ({
})
const getErrorMsg = () => {
if (mutationError || queryError) return 'Internal server error'
if (queryError) return 'Internal server error'
if (twoFAField.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
}