mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 15:06:59 +00:00
Fix build failed on local package
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
parent
401d662f13
commit
67b2629905
17
packages/local/src/checkout/use-submit-checkout.tsx
Normal file
17
packages/local/src/checkout/use-submit-checkout.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import { MutationHook } from '@vercel/commerce/utils/types'
|
||||
import useSubmitCheckout, {
|
||||
UseSubmitCheckout,
|
||||
} from '@vercel/commerce/checkout/use-submit-checkout'
|
||||
|
||||
export default useSubmitCheckout as UseSubmitCheckout<typeof handler>
|
||||
|
||||
export const handler: MutationHook<any> = {
|
||||
fetchOptions: {
|
||||
query: '',
|
||||
},
|
||||
async fetcher({ input, options, fetch }) {},
|
||||
useHook:
|
||||
({ fetch }) =>
|
||||
() =>
|
||||
async () => ({}),
|
||||
}
|
17
packages/local/src/customer/address/use-update-item.tsx
Normal file
17
packages/local/src/customer/address/use-update-item.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import { MutationHook } from '@vercel/commerce/utils/types'
|
||||
import useUpdateItem, {
|
||||
UseUpdateItem,
|
||||
} from '@vercel/commerce/customer/address/use-update-item'
|
||||
|
||||
export default useUpdateItem as UseUpdateItem<typeof handler>
|
||||
|
||||
export const handler: MutationHook<any> = {
|
||||
fetchOptions: {
|
||||
query: '',
|
||||
},
|
||||
async fetcher({ input, options, fetch }) {},
|
||||
useHook:
|
||||
({ fetch }) =>
|
||||
() =>
|
||||
async () => ({}),
|
||||
}
|
@ -1,8 +1,5 @@
|
||||
import type { UpdateItemHook } from '@vercel/commerce/types/customer/address'
|
||||
import type {
|
||||
MutationHook,
|
||||
MutationHookContext,
|
||||
} from '@vercel/commerce/utils/types'
|
||||
import type { MutationHook } from '@vercel/commerce/utils/types'
|
||||
import { useCallback } from 'react'
|
||||
import useUpdateItem, {
|
||||
UseUpdateItem,
|
||||
|
@ -17,7 +17,7 @@ export async function getSearchStaticProps({
|
||||
pages,
|
||||
categories,
|
||||
brands,
|
||||
navigation,
|
||||
...(navigation ? { navigation } : {}),
|
||||
},
|
||||
revalidate: 200,
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ export async function getStaticProps({
|
||||
}
|
||||
|
||||
return {
|
||||
props: { pages, page, categories, navigation },
|
||||
props: { pages, page, categories, ...(navigation ? { navigation } : {}) },
|
||||
revalidate: 60 * 60, // Every hour
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ export async function getStaticProps({
|
||||
categories,
|
||||
brands,
|
||||
pages,
|
||||
navigation,
|
||||
...(navigation ? { navigation } : {}),
|
||||
},
|
||||
revalidate: 60,
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ export async function getStaticProps({
|
||||
product,
|
||||
relatedProducts,
|
||||
categories,
|
||||
navigation,
|
||||
...(navigation ? { navigation } : {}),
|
||||
},
|
||||
revalidate: 200,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user