forked from crowetic/commerce
14 lines
356 B
TypeScript
14 lines
356 B
TypeScript
export const getCheckoutIdFromStorage = (token: string) => {
|
|
if (window && window.sessionStorage) {
|
|
return window.sessionStorage.getItem(token)
|
|
}
|
|
|
|
return null
|
|
}
|
|
|
|
export const setCheckoutIdInStorage = (token: string, id: string | number) => {
|
|
if (window && window.sessionStorage) {
|
|
return window.sessionStorage.setItem(token, id + '')
|
|
}
|
|
}
|