Skip to content

Commit

Permalink
fix filter labels (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsMapleLeaf authored Apr 15, 2024
1 parent 7105703 commit 82a7fc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/pages/integrations/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions src/pages/themes/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,13 @@ const ThemePricing = new Map<string, string>([
["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,
Expand Down

0 comments on commit 82a7fc6

Please sign in to comment.