Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pathname: link,
}));
break;
case QR_CODE_TYPE_SEARCH:
if (await dispatch(handleSearch(data.searchPhrase || ''))) {
dispatch(successHandleScanner(scope, format, payload));
} else {
notFound();
}
break;
case QR_CODE_TYPE_COUPON:
dispatch(successHandleScanner(scope, format, payload));
dispatch(historyReplace({
pathname: link,
}));
dispatch(historyPop());
break;
case QR_CODE_TYPE_PRODUCT:
case QR_CODE_TYPE_PRODUCT_WITH_COUPON:
// Force to fetch missing products
await dispatch(fetchProductsById([data.productId]));
// Check from a store
if (!getProductById(getState(), data)) {
notFound();
} else {
dispatch(successHandleScanner(scope, format, payload));
dispatch(historyReplace({
pathname: link,
}));
}
break;
subscribe(successReviewSubmit$, ({ dispatch, events }) => {
dispatch(historyPop());
events.emit(ToastProvider.ADD, {
id: 'reviews.success_message',
message: 'reviews.success_message',
});
});
subscribe(successReviewSubmit$, ({ dispatch, events }) => {
dispatch(historyPop());
events.emit(ToastProvider.ADD, {
id: 'reviews.success_message',
message: 'reviews.success_message',
});
});
cancel: () => dispatch(historyPop()),
});
goBackHistory: () => dispatch(historyPop()),
});
goBackHistory: () => dispatch(historyPop()),
});
goBack: () => dispatch(historyPop()),
});
goBackHistory: () => dispatch(historyPop()),
});
goBack: () => dispatch(historyPop()),
});
goBack: () => dispatch(historyPop()),
});