Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(() => {
const location = getLocation(getState())
// Do call only if we are still in product page.
if (location.pathname.includes(productId)) {
dispatch(getProductById(productId))
}
}, FIVE_SECONDS)
setTimeout(() => {
const location = getLocation(getState())
// Do call only if we are still in product page.
if (location.pathname.includes(productId)) {
dispatch(getProductById(productId))
}
}, FIVE_SECONDS)
setTimeout(() => {
const location = getLocation(getState())
// Do call only if we are still in product page.
if (location.pathname.includes(productId)) {
dispatch(getProductSubscription(productId))
}
}, FIVE_SECONDS)
})
(state: RootState) => getLocation(state),
(location) => {
state => getLocation(state),
getTotalPages,