Updated sign up interface
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useSendWithButton } from '..'
|
||||
import { composeSignUpURL, processSignUp } from '../../api/signup'
|
||||
import { SignUpBody, isSignUpResponse } from '../../api/signup/types'
|
||||
import { isSignUpResponse } from '../../api/signup/types'
|
||||
|
||||
function useSignUp() {
|
||||
const { doSend, button } = useSendWithButton(
|
||||
@@ -14,12 +14,9 @@ function useSignUp() {
|
||||
processSignUp,
|
||||
)
|
||||
|
||||
async function handleSignUp(data: SignUpBody) {
|
||||
async function handleSignUp(formData: FormData) {
|
||||
const res = await doSend({}, {
|
||||
body: JSON.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: formData,
|
||||
})
|
||||
|
||||
return res ?? false
|
||||
|
Reference in New Issue
Block a user