Prevent skuinfo API calls when product is marked inactive

This commit is contained in:
Shekhar Vaidya 2026-04-11 13:11:01 +05:30
parent 7c651d3b4e
commit 79450e4b35

View file

@ -117,7 +117,7 @@ export default function ProductDetailPage() {
// Fetch languages on mount
useEffect(() => {
if (!productId || !isValidated) return
if (!productId || !isValidated || !meta.active) return
setIsLoadingLangs(true)
setError(null)
setDownloadLinks([])
@ -138,7 +138,7 @@ export default function ProductDetailPage() {
})
.catch(e => setError(e.message))
.finally(() => setIsLoadingLangs(false))
}, [productId, isValidated])
}, [productId, isValidated, meta.active])
async function handleGetLinks() {
if (!selectedSku || !productId) return