refactor: full refactor of user management

This commit is contained in:
Sérgio Salgado 2021-04-16 19:33:56 +01:00 committed by Josh Harvey
parent bbc37c0202
commit 9d028897bd
10 changed files with 328 additions and 225 deletions

View file

@ -10,6 +10,7 @@ import { CodeInput } from 'src/components/inputs/base'
import { H2, P } from 'src/components/typography'
import styles from './Login.styles'
import { STATES } from './states'
const useStyles = makeStyles(styles)
@ -47,7 +48,12 @@ const Input2FAState = ({ state, dispatch }) => {
const [invalidToken, setInvalidToken] = useState(false)
const handle2FAChange = value => {
dispatch({ type: 'twoFAField', payload: value })
dispatch({
type: STATES.INPUT_2FA,
payload: {
twoFAField: value
}
})
setInvalidToken(false)
}