mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 15:06:59 +00:00
Merge pull request #5 from reactioncommerce/open-commerce
Fix build failed on local package
This commit is contained in:
commit
a29bb6fc27
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 { 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,
|
||||||
|
@ -17,7 +17,7 @@ export async function getSearchStaticProps({
|
|||||||
pages,
|
pages,
|
||||||
categories,
|
categories,
|
||||||
brands,
|
brands,
|
||||||
navigation,
|
...(navigation ? { navigation } : {}),
|
||||||
},
|
},
|
||||||
revalidate: 200,
|
revalidate: 200,
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export async function getStaticProps({
|
|||||||
categories,
|
categories,
|
||||||
brands,
|
brands,
|
||||||
pages,
|
pages,
|
||||||
navigation,
|
...(navigation ? { navigation } : {}),
|
||||||
},
|
},
|
||||||
revalidate: 60,
|
revalidate: 60,
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ export async function getStaticProps({
|
|||||||
product,
|
product,
|
||||||
relatedProducts,
|
relatedProducts,
|
||||||
categories,
|
categories,
|
||||||
navigation,
|
...(navigation ? { navigation } : {}),
|
||||||
},
|
},
|
||||||
revalidate: 200,
|
revalidate: 200,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user