* 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];
|
|
};
|