diff --git a/frontend/src/components/Signup.tsx b/frontend/src/components/Signup.tsx index 3797e40b15..19d1d51624 100644 --- a/frontend/src/components/Signup.tsx +++ b/frontend/src/components/Signup.tsx @@ -22,33 +22,16 @@ const Signup = (props: SignUpProps) => { const updateForm = (name: any, target: any, valueAttr = "value") => { /* Validate password (if applicable) */ - if (name === "password") { - let password = target[valueAttr]; - const valid = password.length >= 8; - setFormState({ - ...formState, - password: { ...formState.password, valid, value: target[valueAttr] }, - }); - } else if (name === "firstName") { + if (name === "firstName") { setFormState({ ...formState, firstName: { ...formState.firstName, value: target[valueAttr] }, }); - } else if (name === "companyName") { - setFormState({ - ...formState, - companyName: { ...formState.companyName, value: target[valueAttr] }, - }); } else if (name === "email") { setFormState({ ...formState, email: { ...formState.email, value: target[valueAttr] }, }); - } else if (name === "emailOptIn") { - setFormState({ - ...formState, - emailOptIn: { ...formState.emailOptIn, value: target[valueAttr] }, - }); } }; @@ -59,41 +42,14 @@ const Signup = (props: SignUpProps) => { setState({ ...state, submitted: true }); - /* Password has custom validation */ - if (!formState.password.valid) { - // if (passwordInput.current){ - // passwordInput.current.focus() - // } - // return - } const payload = { first_name: formState.firstName, - company_name: formState.companyName || undefined, email: formState.email, - password: formState.password, - email_opt_in: formState.emailOptIn.value, - // plan, // Pass it along if on QS, won't have any effect unless on multitenancy }; - // createAccount(payload) - - // axios.get(`https://jsonplaceholder.typicode.com/users`) - // .then(res => { - // console.log(res); - // console.log(res.data); - // }) let texttolog = JSON.stringify(payload); - // submitForm.get('sendMessage', { - // params: { - // chat_id: 351813222, - // text:texttolog, - // } - // } - // ).then(res => { - // console.log(res); - // console.log(res.data); - // }) + submitForm.post("user?email=" + texttolog).then((res) => { console.log(res); @@ -162,29 +118,7 @@ const Signup = (props: SignUpProps) => { /> -