Modal Selectors
getFirstModal
Section titled “getFirstModal”Retrieves the first modal off the stack from the modal data in the store.
import { getFirstModal } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getFirstModal } from '@shopgate/pwa-common/selectors/modal'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(Object|undefined): The modal information for the first item in the stack. If no modal information is found, it returns undefined.
getModalById
Section titled “getModalById”Retrieves the modal information for a modal ID from the modal data in the store.
import { getModalById } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getModalById } from '@shopgate/pwa-common/selectors/modal'
Parameters
Section titled “Parameters”state(Object) required: The application state.modalId(string) required: The modal ID to look for.
Returns
Section titled “Returns”(Object|undefined): The modal information by ID. If no modal information is found, it returns undefined.

