non async handles

awaitasyncmodals
bunsenstraat 3 years ago
parent 2b4e753b0e
commit 9b655766d8
  1. 6
      libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx

@ -17,16 +17,16 @@ const ModalWrapper = (props: ModalWrapperProps) => {
onOkFn()
} else {
// @ts-ignore: Object is possibly 'null'.
(props.resolve) ? props.resolve(ref.current.value) : props.okFn(ref.current.value)
(props.okFn) ? props.okFn(ref.current.value) : props.resolve(ref.current.value)
}
}
const onOkFn = async () => {
(props.resolve) ? props.resolve(true) : props.okFn()
(props.okFn) ? props.okFn() : props.resolve(true)
}
const onCancelFn = async () => {
(props.resolve) ? props.resolve(false) : props.cancelFn()
(props.cancelFn) ? props.cancelFn() : props.resolve(false)
}
const createModalMessage = (defaultValue: string) => {

Loading…
Cancel
Save