synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
14 lines • 682 B
TypeScript
export type CookiePreference = {
functionalAllowed: boolean;
analyticsAllowed: boolean;
};
export declare const allowAll: CookiePreference;
export declare const allowNone: CookiePreference;
export declare const COOKIES_AGREEMENT_COOKIE_KEY = "org.sagebionetworks.security.cookies.portal.preference";
/**
* Read the current cookie preferences from the browser cookie jar.
* This must only be called in a browser environment (not during SSR).
*/
export declare const getCurrentCookiePreferences: () => CookiePreference;
export declare const useCookiePreferences: () => [CookiePreference, (pref: CookiePreference) => void];
//# sourceMappingURL=useCookiePreferences.d.ts.map