mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 19:51:23 +00:00
Moved auth & cart hooks + several fixes
This commit is contained in:
@@ -16,7 +16,7 @@ const getCategories = async (config: ShopifyConfig): Promise<Category[]> => {
|
||||
})
|
||||
|
||||
return (
|
||||
data?.collections?.edges?.map(
|
||||
data.collections?.edges?.map(
|
||||
({ node: { title: name, handle } }: CollectionEdge) => ({
|
||||
entityId: handle,
|
||||
name,
|
||||
|
@@ -17,7 +17,7 @@ const getErrorMessage = ({
|
||||
}
|
||||
|
||||
const handleLogin = (data: any) => {
|
||||
const response = data?.customerAccessTokenCreate
|
||||
const response = data.customerAccessTokenCreate
|
||||
const errors = response?.customerUserErrors
|
||||
|
||||
if (errors && errors.length) {
|
||||
|
@@ -4,7 +4,6 @@ export { default as getSortVariables } from './get-sort-variables'
|
||||
export { default as getVendors } from './get-vendors'
|
||||
export { default as getCategories } from './get-categories'
|
||||
export { default as getCheckoutId } from './get-checkout-id'
|
||||
|
||||
export * from './queries'
|
||||
export * from './mutations'
|
||||
export * from './normalize'
|
||||
|
@@ -1,10 +1,7 @@
|
||||
export { default as createCustomerMutation } from './customer-create'
|
||||
export { default as checkoutCreateMutation } from './checkout-create'
|
||||
|
||||
export { default as checkoutLineItemAddMutation } from './checkout-line-item-add'
|
||||
export { default as checkoutLineItemUpdateMutation } from './checkout-create'
|
||||
export { default as checkoutLineItemRemoveMutation } from './checkout-line-item-remove'
|
||||
|
||||
export { default as customerCreateMutation } from './customer-create'
|
||||
export { default as checkoutCreateMutation } from './checkout-create'
|
||||
export { default as checkoutLineItemAddMutation } from './checkout-line-item-add'
|
||||
export { default as checkoutLineItemUpdateMutation } from './checkout-line-item-update'
|
||||
export { default as checkoutLineItemRemoveMutation } from './checkout-line-item-remove'
|
||||
export { default as customerAccessTokenCreateMutation } from './customer-access-token-create'
|
||||
export { default as customerAccessTokenDeleteMutation } from './customer-access-token-delete'
|
||||
|
@@ -1,4 +1,4 @@
|
||||
export const checkoutDetailsFragment = /* GraphQL */ `
|
||||
export const checkoutDetailsFragment = `
|
||||
id
|
||||
webUrl
|
||||
subtotalPrice
|
||||
|
@@ -7,4 +7,4 @@ export { default as getCollectionProductsQuery } from './get-collection-products
|
||||
export { default as getCheckoutQuery } from './get-checkout-query'
|
||||
export { default as getAllPagesQuery } from './get-all-pages-query'
|
||||
export { default as getPageQuery } from './get-page-query'
|
||||
export { default as getCustomerQuery } from './get-checkout-query'
|
||||
export { default as getCustomerQuery } from './get-customer-query'
|
||||
|
Reference in New Issue
Block a user