mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 22:42:33 +00:00
updated useSignup hook
This commit is contained in:
parent
f0a2c744e8
commit
377015ceac
@ -1,16 +1,16 @@
|
||||
import { useCallback } from 'react'
|
||||
import { HookFetcher } from '@lib/commerce/utils/types'
|
||||
import useCommerceSignup from '@lib/commerce/use-signup'
|
||||
import type { CreateCustomerBody } from './api/customers'
|
||||
import type { SignupBody } from './api/customers/signup'
|
||||
|
||||
const defaultOpts = {
|
||||
url: '/api/bigcommerce/customers',
|
||||
url: '/api/bigcommerce/customers/signup',
|
||||
method: 'POST',
|
||||
}
|
||||
|
||||
export type SignupInput = CreateCustomerBody
|
||||
export type SignupInput = SignupBody
|
||||
|
||||
export const fetcher: HookFetcher<null, CreateCustomerBody> = (
|
||||
export const fetcher: HookFetcher<null, SignupBody> = (
|
||||
options,
|
||||
{ firstName, lastName, email, password },
|
||||
fetch
|
||||
|
3
pages/api/bigcommerce/customers/signup.ts
Normal file
3
pages/api/bigcommerce/customers/signup.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import signupApi from '@lib/bigcommerce/api/customers/signup'
|
||||
|
||||
export default signupApi()
|
Loading…
x
Reference in New Issue
Block a user