mirror of
https://github.com/vercel/commerce.git
synced 2025-03-30 17:05:52 +00:00
* 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>
18 lines
340 B
TypeScript
18 lines
340 B
TypeScript
import { useCallback } from 'react'
|
|
|
|
type Options = {
|
|
includeProducts?: boolean
|
|
}
|
|
|
|
export function emptyHook(options?: Options) {
|
|
const useEmptyHook = async ({ id }: { id: string | number }) => {
|
|
return useCallback(async function () {
|
|
return Promise.resolve()
|
|
}, [])
|
|
}
|
|
|
|
return useEmptyHook
|
|
}
|
|
|
|
export default emptyHook
|