Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
redirectToProduct = () => {
const redirect = Redirect.create(this.context.polaris.appBridge);
redirect.dispatch(
Redirect.Action.APP,
'/edit-products'
);
};
function redirectAction(target: AppBridgeTarget, external?: boolean) {
if (external === true) {
return Redirect.Action.REMOTE;
}
return Redirect.Action[target];
}