mirror of
https://github.com/vercel/commerce.git
synced 2025-05-21 00:46:59 +00:00
10 lines
265 B
TypeScript
10 lines
265 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
|