Add selectedVersion checks in multiple components to prevent API calls without a valid version

This commit is contained in:
2025-06-23 10:09:09 +05:30
parent 1ac0e86e74
commit 5d0c36071e
7 changed files with 12 additions and 4 deletions

View File

@@ -41,6 +41,7 @@ function Products() {
}, [comparisonProduct])
useEffect(() => {
if (!selectedVersion) return;
getAllProductsApi(projectId || '', selectedVersion?.versionId || '').then((data) => {
if (data && data.length === 0) {
const id = THREE.MathUtils.generateUUID();