diff --git a/apps/spa/src/components/ProductCard.tsx b/apps/spa/src/components/ProductCard.tsx index 5740773..458fae1 100644 --- a/apps/spa/src/components/ProductCard.tsx +++ b/apps/spa/src/components/ProductCard.tsx @@ -43,7 +43,7 @@ export default function ProductCard({ product, enableQuickShop = false, category const { addToCart } = useCartStore(); const { i18n, t } = useTranslation(); const isWished = isInWishlist(product.id); - const [selectedVariant, setSelectedVariant] = useState(product.variants?.[0] || null); + const [selectedVariant, _setSelectedVariant] = useState(product.variants?.[0] || null); const displayName = resolveStr(product.name, i18n.language) || (product.brand ? product.brand.name : ''); const displayCategoryName = categoryNameOverride || resolveStr(product.category.name, i18n.language); diff --git a/apps/spa/src/components/sections/AccordionSection.tsx b/apps/spa/src/components/sections/AccordionSection.tsx index e7ee6c7..3b6906f 100644 --- a/apps/spa/src/components/sections/AccordionSection.tsx +++ b/apps/spa/src/components/sections/AccordionSection.tsx @@ -29,7 +29,7 @@ export default function AccordionSection({ payload }: AccordionSectionProps) { {title} )} - {payload.categories.map((category, catIndex) => ( + {(payload.categories ?? []).map((category, catIndex) => (