From e5c1a26d206b76f12afdac79cd814ca3c69cee1a Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Wed, 4 May 2022 13:26:33 -0400 Subject: [PATCH] WIP --- web/components/charity/charity-card.tsx | 6 ++++++ web/pages/charity/index.tsx | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/web/components/charity/charity-card.tsx b/web/components/charity/charity-card.tsx index 2bf8f879..dfd68268 100644 --- a/web/components/charity/charity-card.tsx +++ b/web/components/charity/charity-card.tsx @@ -6,6 +6,7 @@ import { Charity } from '../../../common/charity' import { useCharityTxns } from '../../hooks/use-charity-txns' import { manaToUSD } from '../../pages/charity/[charitySlug]' import { Row } from '../layout/row' +import { TagsList } from '../tags-list' export function CharityCard(props: { charity: Charity }) { const { name, slug, photo, preview, id, tags } = props.charity @@ -41,6 +42,11 @@ export function CharityCard(props: { charity: Charity }) { raised )} + tag !== 'Featured')} + noLabel + noLink + /> diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index 39e96792..ba51f92f 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -1,11 +1,16 @@ import _ from 'lodash' import { useState, useMemo } from 'react' -import { charities, Charity as CharityType } from '../../../common/charity' +import { + charities, + Charity as CharityType, + mainTags, +} from '../../../common/charity' import { CharityCard } from '../../components/charity/charity-card' import { Col } from '../../components/layout/col' import { Spacer } from '../../components/layout/spacer' import { Page } from '../../components/page' import { SiteLink } from '../../components/site-link' +import { TagsList } from '../../components/tags-list' import { Title } from '../../components/title' import { getAllCharityTxns } from '../../lib/firebase/txns' @@ -65,6 +70,8 @@ export default function Charity(props: { placeholder="Search charities" className="input input-bordered mb-6 w-full" /> + +
{filterCharities.map((charity) => (