mirror of
https://github.com/vercel/commerce.git
synced 2025-06-20 14:11:20 +00:00
10 lines
266 B
TypeScript
10 lines
266 B
TypeScript
import Cookies from 'js-cookie'
|
|
import { CHECKOUT_ID_COOKIE } from '../const'
|
|
|
|
const getCheckoutId = (id?: string) => {
|
|
const r = Cookies.get(CHECKOUT_ID_COOKIE)?.split(":") || [];
|
|
return { checkoutId: r[0], checkoutToken: r[1] }
|
|
}
|
|
|
|
export default getCheckoutId
|