forked from crowetic/commerce
* Add ordercloud provider * Fix provider errors * Make submit checkout optional * Make submit checkout optional * Remove nullables when creating endpoint type * Update readme * Log checkout error * Log error * Save token to cookie * Update fetch rest * Use token at checkout Co-authored-by: Luis Alvarez <luis@vercel.com>
20 lines
440 B
TypeScript
20 lines
440 B
TypeScript
import { useCallback } from 'react'
|
|
import useCustomer from '../customer/use-customer'
|
|
import { MutationHook } from '@commerce/utils/types'
|
|
import useSignup, { UseSignup } from '@commerce/auth/use-signup'
|
|
|
|
export default useSignup as UseSignup<typeof handler>
|
|
|
|
export const handler: MutationHook<any> = {
|
|
fetchOptions: {
|
|
query: '',
|
|
},
|
|
async fetcher() {
|
|
return null
|
|
},
|
|
useHook:
|
|
({ fetch }) =>
|
|
() =>
|
|
() => {},
|
|
}
|