Last active
June 16, 2024 23:01
-
-
Save walosha/2adb7accfa6c59581757888153e33e8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SIGN UP | |
// const { mutate: signUp } = trpc.user.signup.useMutation({ | |
// onError: (e) => { | |
// console.log("Error===>", e); | |
// // showAlert(res?.message, 'error'); | |
// }, | |
// onSuccess: () => { | |
// console.log("success"); | |
// // showAlert('Corporate Admin successfully set', 'success'); | |
// // setModalClose(1); | |
// }, | |
// }); | |
// useEffect(() => { | |
// signUp({ email: "[email protected]", password: "Olajuwon1?" }); | |
// }, []); | |
// VERIFY WITH OTP | |
const { mutate: signUp } = trpc.user.verifyOTP.useMutation({ | |
onError: (e) => { | |
console.log("Error===>", e); | |
// showAlert(res?.message, 'error'); | |
}, | |
onSuccess: () => { | |
console.log("success"); | |
// showAlert('Corporate Admin successfully set', 'success'); | |
// setModalClose(1); | |
}, | |
}); | |
useEffect(() => { | |
signUp({ useCase: "SIGNUP", otp: "289348" }); | |
}, []); | |
// SIGN in | |
const { mutate: signUp } = trpc.user.login.useMutation({ | |
onError: (e) => { | |
console.log("Error===>", e); | |
// showAlert(res?.message, 'error'); | |
}, | |
onSuccess: () => { | |
console.log("success"); | |
// showAlert('Corporate Admin successfully set', 'success'); | |
// setModalClose(1); | |
}, | |
}); | |
useEffect(() => { | |
// signUp({ useCase: "LOGIN", otp: "450549" }); | |
signUp({ email: "[email protected]", password: "Olajuwon1?" }); | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment