Skip to content

Commit

Permalink
console: Fix submit user request
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaplots committed Dec 18, 2024
1 parent e790b16 commit 48d3506
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/webui/console/containers/user-data-form/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import capitalizeMessage from '@ttn-lw/lib/capitalize-message'
import { createUser } from '@console/store/actions/users'

import { selectPasswordRequirements } from '@console/store/selectors/identity-server'
import attachPromise from '@ttn-lw/lib/store/actions/attach-promise'

const approvalStates = [
'STATE_REQUESTED',
Expand Down Expand Up @@ -73,7 +74,10 @@ const UserDataFormAdd = () => {
const validationSchema = baseValidationSchema.concat(
createPasswordValidationSchema(passwordRequirements),
)
const createUserAction = useCallback(values => dispatch(createUser(values)), [dispatch])
const createUserAction = useCallback(
values => dispatch(attachPromise(createUser(values))),
[dispatch],
)

const { formatMessage } = intl

Expand Down

0 comments on commit 48d3506

Please sign in to comment.