Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function CookieUniversalProvider({server, children}: Props) {
const manager = useNetworkManager();
const cookieManager = useLazyRef(() => {
if (!server && hasDocumentCookie()) {
return new BrowserCookieManager();
}
if (manager == null) {
throw new Error(NO_MANAGER_ERROR);
}
return manager.cookies;
}).current;
return (
{children}