fix: remove signup code
This commit is contained in:
@@ -6,7 +6,6 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { useEnterDetailsStore } from "@/stores/enter-details"
|
||||
|
||||
import { registerUserBookingFlow } from "@/actions/registerUserBookingFlow"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import CountrySelect from "@/components/TempDesignSystem/Form/Country"
|
||||
import Input from "@/components/TempDesignSystem/Form/Input"
|
||||
@@ -59,36 +58,8 @@ export default function Details({ user }: DetailsProps) {
|
||||
|
||||
const completeStep = useEnterDetailsStore((state) => state.completeStep)
|
||||
|
||||
// const errorMessage = intl.formatMessage({
|
||||
// id: "An error occurred. Please try again.",
|
||||
// })
|
||||
|
||||
const onSubmit = useCallback(
|
||||
async function (values: DetailsSchema) {
|
||||
if (values.join) {
|
||||
const signupVals = {
|
||||
firstName: values.firstName,
|
||||
lastName: values.lastName,
|
||||
email: values.email,
|
||||
phoneNumber: values.phoneNumber,
|
||||
address: {
|
||||
zipCode: values.zipCode,
|
||||
countryCode: values.countryCode,
|
||||
},
|
||||
dateOfBirth: values.dateOfBirth,
|
||||
}
|
||||
|
||||
const res = await registerUserBookingFlow(signupVals)
|
||||
if (!res.success) {
|
||||
// if (res.error) {
|
||||
// toast.error(res.error)
|
||||
// } else {
|
||||
// toast.error(errorMessage)
|
||||
// }
|
||||
return
|
||||
}
|
||||
console.log("Signed up user: ", res)
|
||||
}
|
||||
completeStep(values)
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user