Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dschlabach committed Dec 5, 2024
1 parent 028b1c6 commit 58f6847
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 13 deletions.
21 changes: 21 additions & 0 deletions apps/web/public/images/partners/eurc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/web/public/images/partners/usdc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 16 additions & 13 deletions apps/web/src/components/Ecosystem/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,28 @@ export default function Content() {
});

// If a subcategory is selected, the category is selected automatically
const selectedCategories = useMemo(() => {
return [
const selectedCategories = useMemo(
() => [
...new Set(
selectedSubcategories.map(
(subcategory) =>
Object.keys(config).find((category) => config[category].includes(subcategory)) ?? 'all',
),
),
];
}, [selectedSubcategories]);

const filteredEcosystemApps = useMemo(() => {
return decoratedEcosystemApps.filter((app) => {
const isSubcategoryMatched =
selectedSubcategories.length === 0 || selectedSubcategories.includes(app.subcategory);
const isSearched = search === '' || app.searchName.includes(search.toLowerCase());
return isSubcategoryMatched && isSearched;
});
}, [selectedSubcategories, search]);
],
[selectedSubcategories],
);

const filteredEcosystemApps = useMemo(
() =>
decoratedEcosystemApps.filter((app) => {
const isSubcategoryMatched =
selectedSubcategories.length === 0 || selectedSubcategories.includes(app.subcategory);
const isSearched = search === '' || app.searchName.includes(search.toLowerCase());
return isSubcategoryMatched && isSearched;
}),
[selectedSubcategories, search],
);

useEffect(() => {
updateUrlParams({
Expand Down
16 changes: 16 additions & 0 deletions apps/web/src/data/ecosystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -3502,5 +3502,21 @@
"subcategory": "self-custody",
"url": "https://bend.eco",
"imageUrl": "/images/partners/bend.jpg"
},
{
"name": "USDC",
"category": "defi",
"subcategory": "stablecoin",
"description": "",
"url": "https://www.circle.com/usdc",
"imageUrl": "/images/partners/usdc.svg"
},
{
"name": "EURC",
"category": "defi",
"subcategory": "stablecoin",
"description": "",
"url": "https://www.circle.com/eurc",
"imageUrl": "/images/partners/eurc.svg"
}
]

0 comments on commit 58f6847

Please sign in to comment.