diff --git a/apps/web/app/(base-org)/ecosystem/page.tsx b/apps/web/app/(base-org)/ecosystem/page.tsx index fd7ae03..4543d50 100644 --- a/apps/web/app/(base-org)/ecosystem/page.tsx +++ b/apps/web/app/(base-org)/ecosystem/page.tsx @@ -4,8 +4,10 @@ import { Divider } from 'apps/web/src/components/Divider/Divider'; import { List } from 'apps/web/src/components/Ecosystem/List'; import type { Metadata } from 'next'; import Image from 'next/image'; +import ecosystemApps from 'apps/web/src/data/ecosystem.json'; +import { TagChip } from 'apps/web/src/components/Ecosystem/TagChip'; +import { SearchBar } from 'apps/web/src/components/Ecosystem/SearchBar'; import { Suspense } from 'react'; - export const metadata: Metadata = { metadataBase: new URL('https://base.org'), title: `Base | About`, @@ -15,6 +17,42 @@ export const metadata: Metadata = { }, }; +export type EcosystemApp = { + searchName: string; + name: string; + url: string; + description: string; + tags: string[]; + imageUrl: string; +}; + +const tags = [ + 'all', + ...ecosystemApps + .map((app) => app.tags) + .flat() + .filter((value, index, array) => { + return array.indexOf(value) === index; + }), +]; + +function orderedEcosystemAppsAsc() { + return ecosystemApps.sort((a, b) => { + if (a.name.toLowerCase() > b.name.toLowerCase()) { + return 1; + } + if (b.name.toLowerCase() > a.name.toLowerCase()) { + return -1; + } + return 0; + }); +} + +const decoratedEcosystemApps: EcosystemApp[] = orderedEcosystemAppsAsc().map((d) => ({ + ...d, + searchName: d.name.toLowerCase(), +})); + async function EcosystemHero() { return (