URL Selectors

getUrl

Retrieves the URL for a given type from the store.

Usage

import { getUrl } from '@shopgate/engage/core';

Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7: import { getUrl } from '@shopgate/pwa-common/selectors/url';

Parameters

  • state (Object) required: The application state.
  • props (Object) required: An object containing props.
    • type (string) required: The URL type.
      • Possible Values: checkout, register.

Returns

(string|null): The requested URL. If no URL is found, it returns null.