From 82a7fc63dd6fe6b165d6a07f2cc543ef96421edb Mon Sep 17 00:00:00 2001 From: Darius <19603573+itsMapleLeaf@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:42:31 -0500 Subject: [PATCH] fix filter labels (#1074) --- src/pages/integrations/[...page].astro | 5 +---- src/pages/themes/[...page].astro | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/pages/integrations/[...page].astro b/src/pages/integrations/[...page].astro index e6f6798b4d..0fda698b8b 100644 --- a/src/pages/integrations/[...page].astro +++ b/src/pages/integrations/[...page].astro @@ -28,16 +28,13 @@ if (!currentPage || Number.isNaN(currentPage)) { // search term from the search/filter panel const search = Astro.url.searchParams.get("search"); -// get a list of all supported categories, this is the same list used by the zod schema -const categories = Array.from(IntegrationCategories.keys()); - // get a list of category filters applied to the request const selectedCategories = Astro.url.searchParams.getAll("categories[]"); // massage category data for the Filter components const categoryFilter: FilterGroup = { title: "Categories", - options: [...categories].map(([id, label]) => ({ + options: [...IntegrationCategories].map(([id, label]) => ({ id, name: "categories[]", value: id, diff --git a/src/pages/themes/[...page].astro b/src/pages/themes/[...page].astro index 68412af8a8..dc1372f5c6 100644 --- a/src/pages/themes/[...page].astro +++ b/src/pages/themes/[...page].astro @@ -70,16 +70,13 @@ const ThemePricing = new Map([ ["paid", "Paid"], ]); -// get a list of all supported tools, this is the same list used by the zod schema -const pricing = Array.from(ThemePricing.keys()); - // get a list of tool filters applied to the request const selectedPricing = Astro.url.searchParams.getAll("price[]"); // massage tool data for the Filter components const priceFilter: FilterGroup = { title: "Pricing", - options: [...pricing].map(([id, label]) => ({ + options: [...ThemePricing].map(([id, label]) => ({ id, name: "price[]", value: id,