fix: remove logic unnecessarily tied to components and error handling

This commit is contained in:
Sérgio Salgado 2021-04-20 20:15:22 +01:00 committed by Josh Harvey
parent 75a2ecd3c2
commit 26a051ff07
10 changed files with 123 additions and 112 deletions

View file

@ -39,23 +39,23 @@ const initialValues = {
role: ''
}
const radioOptions = [
{
code: 'user',
display: 'Regular user'
},
{
code: 'superuser',
display: 'Superuser'
}
]
const CreateUserModal = ({ state, dispatch }) => {
const classes = useStyles()
const [usernameField, setUsernameField] = useState('')
const [createUserURL, setCreateUserURL] = useState(null)
const radioOptions = [
{
code: 'user',
display: 'Regular user'
},
{
code: 'superuser',
display: 'Superuser'
}
]
const handleClose = () => {
setCreateUserURL(null)
dispatch({