Skip to content

showConsentsModal(): void

The showConsentsModal method allows to show the consent modal.

Input parameters

none

Returned value

A returned value has a type of void as this method does not return anything.

Event Bus events

This API method dispatches the following events with the Event Bus:

Example

In this example we make a customerPrivacyApi call to show the consent modal.

useStorefront((storefront) => {
    const customerPrivacyApi = await storefront.getApi('customerPrivacyApi');

    customerPrivacyApi.showConsentsModal();
});

Customer Privacy API methods reference