mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 06:56:59 +00:00
add missing types to site
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
parent
1de2d253e9
commit
381d4a987f
@ -1,17 +1,2 @@
|
||||
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 () => ({}),
|
||||
}
|
||||
export * from '@vercel/commerce/checkout/use-submit-checkout'
|
||||
export { default } from '@vercel/commerce/checkout/use-submit-checkout'
|
||||
|
@ -1,17 +1,2 @@
|
||||
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 () => ({}),
|
||||
}
|
||||
export * from '@vercel/commerce/customer/address/use-update-item'
|
||||
export { default } from '@vercel/commerce/customer/address/use-update-item'
|
||||
|
@ -40,6 +40,8 @@ export interface Brand {
|
||||
path: string
|
||||
}
|
||||
|
||||
export type Navigation = any
|
||||
|
||||
/**
|
||||
* Operation to get site information. This includes categories and brands.
|
||||
*/
|
||||
@ -47,5 +49,6 @@ export type GetSiteInfoOperation = {
|
||||
data: {
|
||||
categories: Category[]
|
||||
brands: Brand[]
|
||||
navigation?: Navigation[]
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ const ShippingMethod = () => {
|
||||
await updateShippingMethod({
|
||||
id: cart!.id,
|
||||
...addressFields,
|
||||
shippingMethodId: event.target.shippingMethod.value,
|
||||
...(event.target.shippingMethod.value ? {shippingMethodId: event.target.shippingMethod.value} : {})
|
||||
})
|
||||
|
||||
setSidebarView('CHECKOUT_VIEW')
|
||||
|
@ -16,8 +16,7 @@ import ShippingMethodView from '@components/checkout/ShippingMethodView'
|
||||
import { CheckoutProvider } from '@components/checkout/context'
|
||||
import { MenuSidebarView } from '@components/common/UserNav'
|
||||
import type { Page } from '@commerce/types/page'
|
||||
import type { Category } from '@commerce/types/site'
|
||||
import type { Navigation } from '@framework/types/site'
|
||||
import type { Category, Navigation } from '@commerce/types/site'
|
||||
import type { Link as LinkProps } from '../UserNav/MenuSidebarView'
|
||||
|
||||
const Loading = () => (
|
||||
|
@ -5,7 +5,7 @@ import s from './Navbar.module.css'
|
||||
import NavbarRoot from './NavbarRoot'
|
||||
import { Logo, Container } from '@components/ui'
|
||||
import { Searchbar, UserNav } from '@components/common'
|
||||
import type { Navigation } from '@framework/types/site'
|
||||
import type { Navigation } from '@commerce/types/site'
|
||||
import CustomNavbar from './CustomNavbar'
|
||||
|
||||
interface Link {
|
||||
|
@ -23,8 +23,8 @@
|
||||
"@components/*": ["components/*"],
|
||||
"@commerce": ["../packages/commerce/src"],
|
||||
"@commerce/*": ["../packages/commerce/src/*"],
|
||||
"@framework": ["../packages/opencommerce/src"],
|
||||
"@framework/*": ["../packages/opencommerce/src/*"]
|
||||
"@framework": ["../packages/bigcommerce/src"],
|
||||
"@framework/*": ["../packages/bigcommerce/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user