import { useSeekaConverge } from '@seeka-labs/converge-react';
import { IabPrivacyConsentPurposeId } from '@seeka-labs/converge';
export const MyComponent = () => {
const converge = useSeekaConverge();
const optOut = () => {
converge.privacy.setPrivacyState({
deniedIabPurposeIds: [IabPrivacyConsentPurposeId.MeasureAdvertisingPerformance]
});
}
const optIn = () => {
converge.privacy.setPrivacyState({
grantedIabPurposeIds: [IabPrivacyConsentPurposeId.MeasureAdvertisingPerformance]
});
}
return (
<Button variant='outlined' onClick={() => optOut()}>Opt out</Button>
<Button variant='outlined' onClick={() => optIn()}>Opt in</Button>
)
}