fix: remove logic unnecessarily tied to components and error handling
This commit is contained in:
parent
75a2ecd3c2
commit
26a051ff07
10 changed files with 123 additions and 112 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue