mirror of
https://github.com/vercel/commerce.git
synced 2025-06-17 20:51:21 +00:00
18 lines
473 B
TypeScript
18 lines
473 B
TypeScript
import { SWRHook } from '@commerce/utils/types';
|
|
import useCheckout, { UseCheckout } from '@commerce/checkout/use-checkout';
|
|
|
|
export default useCheckout as UseCheckout<typeof handler>;
|
|
|
|
export const handler: SWRHook<any> = {
|
|
// Provide fetchOptions for SWR cache key
|
|
fetchOptions: {
|
|
// TODO: Revise url and query
|
|
url: 'checkout',
|
|
query: 'show'
|
|
},
|
|
async fetcher({ input, options, fetch }) {},
|
|
useHook:
|
|
({ useData }) =>
|
|
async (input) => ({})
|
|
};
|