mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
remove/update Shopify wording in vars
Signed-off-by: Loan Laux <loan@outgrow.io>
This commit is contained in:
parent
805100a7aa
commit
ffe33d6453
@ -1,2 +0,0 @@
|
|||||||
SHOPIFY_STORE_DOMAIN=
|
|
||||||
SHOPIFY_STOREFRONT_ACCESS_TOKEN=
|
|
@ -12,7 +12,7 @@ import {
|
|||||||
|
|
||||||
if (!API_URL) {
|
if (!API_URL) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The environment variable NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN is missing and it's required to access your store`
|
`The environment variable API_URL is missing and it's required to access your store`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ export const REACTION_EMPTY_DUMMY_CART_ID = 'DUMMY_EMPTY_CART_ID'
|
|||||||
|
|
||||||
export const REACTION_CUSTOMER_TOKEN_COOKIE = 'reaction_customerToken'
|
export const REACTION_CUSTOMER_TOKEN_COOKIE = 'reaction_customerToken'
|
||||||
|
|
||||||
export const STORE_DOMAIN = process.env.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN
|
|
||||||
|
|
||||||
export const REACTION_COOKIE_EXPIRE = 30
|
export const REACTION_COOKIE_EXPIRE = 30
|
||||||
|
|
||||||
export const API_URL = `http://127.0.0.1:3000/graphql`
|
export const API_URL = `http://127.0.0.1:3000/graphql`
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
REACTION_ANONYMOUS_CART_TOKEN_COOKIE,
|
REACTION_ANONYMOUS_CART_TOKEN_COOKIE,
|
||||||
REACTION_CART_ID_COOKIE,
|
REACTION_CART_ID_COOKIE,
|
||||||
STORE_DOMAIN,
|
|
||||||
} from './const'
|
} from './const'
|
||||||
|
|
||||||
import { handler as useCart } from './cart/use-cart'
|
import { handler as useCart } from './cart/use-cart'
|
||||||
@ -22,7 +21,6 @@ export const reactionCommerceProvider = {
|
|||||||
locale: 'en-us',
|
locale: 'en-us',
|
||||||
anonymousCartTokenCookie: REACTION_ANONYMOUS_CART_TOKEN_COOKIE,
|
anonymousCartTokenCookie: REACTION_ANONYMOUS_CART_TOKEN_COOKIE,
|
||||||
cartIdCookie: REACTION_CART_ID_COOKIE,
|
cartIdCookie: REACTION_CART_ID_COOKIE,
|
||||||
storeDomain: STORE_DOMAIN,
|
|
||||||
fetcher,
|
fetcher,
|
||||||
cart: { useCart, useAddItem, useUpdateItem, useRemoveItem },
|
cart: { useCart, useAddItem, useUpdateItem, useRemoveItem },
|
||||||
customer: { useCustomer },
|
customer: { useCustomer },
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
import * as Core from '@commerce/types'
|
import * as Core from '@commerce/types'
|
||||||
import { CheckoutLineItem } from './schema'
|
|
||||||
|
|
||||||
export type ShopifyCheckout = {
|
|
||||||
id: string
|
|
||||||
webUrl: string
|
|
||||||
lineItems: CheckoutLineItem[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Cart extends Core.Cart {
|
export interface Cart extends Core.Cart {
|
||||||
id: string
|
id: string
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { FetcherError } from '@commerce/utils/errors'
|
import { FetcherError } from '@commerce/utils/errors'
|
||||||
|
|
||||||
export function getError(errors: any[], status: number) {
|
export function getError(errors: any[], status: number) {
|
||||||
errors = errors ?? [{ message: 'Failed to fetch Shopify API' }]
|
errors = errors ?? [{ message: 'Failed to fetch Reaction Commerce API' }]
|
||||||
return new FetcherError({ errors, status })
|
return new FetcherError({ errors, status })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// TODO: replace this hook and other wishlist hooks with a handler, or remove them if
|
// TODO: replace this hook and other wishlist hooks with a handler, or remove them if
|
||||||
// Shopify doesn't have a wishlist
|
// Reaction Commerce doesn't have a wishlist
|
||||||
|
|
||||||
import { HookFetcher } from '@commerce/utils/types'
|
import { HookFetcher } from '@commerce/utils/types'
|
||||||
import { Product } from '../schema'
|
import { Product } from '../schema'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user