Untitled
unknown
javascript
10 days ago
939 B
4
Indexable
const handleSubmit = () => { handleKeyboard() const err = useValidate(form, setForm) if (!err?.isError) { if (!loading) setLoading(true) put('/klk/pin', { managePinType: 'set', pin: form?.pin }, { authorization: true }, ({ response }) => { console.log('masuk kesini') if (response?.status === 200 && response?.problem === null) { console.log('masuk kesini 2') if (!response?.data?.error && response?.data?.data?.status === 'ok') { console.log('masuk kesini 3') dispatch(UserActions.userPinStatusRequest()) ref?.current?.snapTo(1) setTimeout(() => { trackMixpanel(type.SETUP_NEW_PIN, { Location: from ?? '' }) onClose() }, 500) } else { setForm({ ...form, pinError: response?.data?.data?.messages?.[0]}) } } setLoading(false) }) } }
Editor is loading...
Leave a Comment