useAirsokoCookies
This hook has been deprecated
Sets Airsoko user and session cookies and refreshes the expiry time.
useAirsokoCookies(options)
Manages Airsoko cookies. If hasUserConsent option is false, Airsoko cookies will be removed.
Example Usage
import * as React from "react";
import { useAirsokoCookies } from "@airsoko/react";
export default function App({ Component, pageProps }) {
useAirsokoCookies({ hasUserConsent: false });
return <Component {...pageProps} />;
}Parameters
| Name | Type | Description |
|---|---|---|
options | UseAirsokoCookiesOptions | Options for managing Airsoko cookies. |
Options
| Name | Type | Description |
|---|---|---|
hasUserConsent | boolean | Indicates whether the user has provided consent. If false, Airsoko cookies will be removed. |