How to use the @shopify/app-bridge/actions.Redirect.Action function in @shopify/app-bridge

To help you get started, we’ve selected a few @shopify/app-bridge examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / shopify-demo-app-node-react / components / ResourceList.js View on Github external
redirectToProduct = () => {
    const redirect = Redirect.create(this.context.polaris.appBridge);
    redirect.dispatch(
      Redirect.Action.APP,
      '/edit-products'
    );
  };
github Shopify / polaris-react / src / utilities / app-bridge-transformers.ts View on Github external
function redirectAction(target: AppBridgeTarget, external?: boolean) {
  if (external === true) {
    return Redirect.Action.REMOTE;
  }

  return Redirect.Action[target];
}