Fix build failed on local package

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe 2022-05-19 10:37:24 +07:00
parent 401d662f13
commit 67b2629905
7 changed files with 39 additions and 8 deletions

View 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 () => ({}),
}

View 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 () => ({}),
}

View File

@ -1,8 +1,5 @@
import type { UpdateItemHook } from '@vercel/commerce/types/customer/address' import type { UpdateItemHook } from '@vercel/commerce/types/customer/address'
import type { import type { MutationHook } from '@vercel/commerce/utils/types'
MutationHook,
MutationHookContext,
} from '@vercel/commerce/utils/types'
import { useCallback } from 'react' import { useCallback } from 'react'
import useUpdateItem, { import useUpdateItem, {
UseUpdateItem, UseUpdateItem,

View File

@ -17,7 +17,7 @@ export async function getSearchStaticProps({
pages, pages,
categories, categories,
brands, brands,
navigation, ...(navigation ? { navigation } : {}),
}, },
revalidate: 200, revalidate: 200,
} }

View File

@ -44,7 +44,7 @@ export async function getStaticProps({
} }
return { return {
props: { pages, page, categories, navigation }, props: { pages, page, categories, ...(navigation ? { navigation } : {}) },
revalidate: 60 * 60, // Every hour revalidate: 60 * 60, // Every hour
} }
} }

View File

@ -30,7 +30,7 @@ export async function getStaticProps({
categories, categories,
brands, brands,
pages, pages,
navigation, ...(navigation ? { navigation } : {}),
}, },
revalidate: 60, revalidate: 60,
} }

View File

@ -43,7 +43,7 @@ export async function getStaticProps({
product, product,
relatedProducts, relatedProducts,
categories, categories,
navigation, ...(navigation ? { navigation } : {}),
}, },
revalidate: 200, revalidate: 200,
} }