diff --git a/src/components/CardGrid.astro b/src/components/CardGrid.astro
index 56c3bdd..a376269 100644
--- a/src/components/CardGrid.astro
+++ b/src/components/CardGrid.astro
@@ -17,6 +17,7 @@
diff --git a/src/pages/partials/cards.astro b/src/pages/partials/cards.astro
index ce3ca06..ad8bb8a 100644
--- a/src/pages/partials/cards.astro
+++ b/src/pages/partials/cards.astro
@@ -5,7 +5,7 @@ import RarityIcon from '../../components/RarityIcon.astro';
export const prerender = false;
// all the facet fields we want to use for filtering
-const facetFields = {
+const facetFields:any = {
"productLineName": "Product Line",
"setName": "Set",
"variant": "Variant",
@@ -90,7 +90,7 @@ const totalHits = cardResults?.found;
// format price to 2 decimal places (or 0 if price >=100) and adds a $ sign, if the price is null it returns "–"
const formatPrice = (condition:string, skus: any) => {
- const sku = skus.find(price => price.condition === condition);
+ const sku:any = skus.find((price:any) => price.condition === condition);
if (typeof sku === 'undefined' || typeof sku.marketPrice === 'undefined') return '—';
const price = Number(sku.marketPrice) / 100.0;
@@ -113,18 +113,16 @@ const facetNames = (name:string) => {
return facetFields[name] || name;
}
-if (start === 0) {
- var facets = searchResults.results.slice(1).map((result: any) => {
- return result.facet_counts[0];
- });
-}
+const facets = searchResults.results.slice(1).map((result: any) => {
+ return result.facet_counts[0];
+});
---
{(start === 0) &&
-
+
{facets.map((facet) => (
@@ -134,7 +132,7 @@ if (start === 0) {
}
- {facet.counts.map((count) => (
+ {facet.counts.map((count:any) => (