saleor: initial cart integration

This commit is contained in:
Zaiste
2021-04-26 16:24:50 +02:00
parent ef10084e54
commit 19445747f1
9 changed files with 41 additions and 76 deletions

View File

@@ -1,5 +1,9 @@
import Cookies from 'js-cookie'
import { CHECKOUT_ID_COOKIE } from '../const'
const getCheckoutId = (id?: string) => {
return id
const r = Cookies.get(CHECKOUT_ID_COOKIE)?.split(":") || [];
return { checkoutId: r[0], checkoutToken: r[1] }
}
export default getCheckoutId