mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
* Handle date mismatch b/w schedule key and slot * Add feature ollout support
10 lines
232 B
TypeScript
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];
|
|
};
|