Files
calendar/packages/lib/cookie.ts
T
Hariom BalharaandGitHub 0ad5770bb9 fix: Valid timeslot marked 'slot no longer available' (#19590)
* Handle date mismatch b/w schedule key and slot

* Add feature ollout support
2025-02-27 11:13:36 -07:00

10 lines
232 B
TypeScript

export const getCookie = (name: string) => {
if (typeof document === "undefined") {
return null;
}
return document.cookie
.split(";")
.find((cookie) => cookie.trim().startsWith(`${name}=`))
?.split("=")[1];
};