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