Skip to content

Commit

Permalink
move error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ButteryCrumpet authored and Rokt33r committed Jul 20, 2022
1 parent 815523a commit 7b7c5b7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const WorkspaceModalForm = ({ workspace }: WorkspaceModalFormProps) => {
const {
globalData: { currentUser },
} = useGlobalData()
const { pushMessage } = useToast()
const { pushMessage, pushApiErrorMessage } = useToast()
const { closeLastModal, openModal } = useModal()
const { updateWorkspacesMap } = useNav()
const inputRef = useRef<HTMLInputElement>(null)
Expand Down Expand Up @@ -170,7 +170,7 @@ const WorkspaceModalForm = ({ workspace }: WorkspaceModalFormProps) => {
}
closeLastModal()
} catch (error) {
setError(error)
pushApiErrorMessage(error)
} finally {
setSending(false)
}
Expand All @@ -179,6 +179,7 @@ const WorkspaceModalForm = ({ workspace }: WorkspaceModalFormProps) => {
name,
closeLastModal,
pushMessage,
pushApiErrorMessage,
selectedPermissions,
submitCreateWorkSpaceHandler,
submitEditWorkSpaceHandler,
Expand Down

0 comments on commit 7b7c5b7

Please sign in to comment.