mirror of
https://github.com/vercel/commerce.git
synced 2025-08-10 19:01:22 +00:00
.vscode
assets
components
config
framework
bigcommerce
commerce
shopify
swell
api
auth
cart
common
customer
product
utils
customer-token.ts
get-categories.ts
get-checkout-id.ts
get-search-variables.ts
get-sort-variables.ts
get-vendors.ts
handle-fetch-response.ts
handle-login.ts
index.ts
normalize.ts
storage.ts
wishlist
.env.template
commerce.config.json
const.ts
fetcher.ts
index.tsx
next.config.js
provider.ts
schema.d.ts
schema.graphql
swell-js.d.ts
types.ts
vendure
lib
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
9 lines
211 B
TypeScript
9 lines
211 B
TypeScript
import Cookies from 'js-cookie'
|
|
import { SWELL_CHECKOUT_ID_COOKIE } from '../const'
|
|
|
|
const getCheckoutId = (id?: string) => {
|
|
return id ?? Cookies.get(SWELL_CHECKOUT_ID_COOKIE)
|
|
}
|
|
|
|
export default getCheckoutId
|