From 8046bd2b6bde0f890cd55c860df3fedd6ff375e3 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Wed, 27 Apr 2022 17:23:39 -0700 Subject: [PATCH] Move pic to top of card. Other misc styling. --- web/components/charity/charity-card.tsx | 14 +++++++++----- web/pages/charity/index.tsx | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/web/components/charity/charity-card.tsx b/web/components/charity/charity-card.tsx index c126c8c2..4789051f 100644 --- a/web/components/charity/charity-card.tsx +++ b/web/components/charity/charity-card.tsx @@ -12,14 +12,18 @@ export function CharityCard(props: { charity: Charity }) { return ( -
-
- {photo && } +
+
+ {photo ? ( + + ) : ( +
+ )}

{name}

-
{blurb}
- +
{blurb}
+ ${Math.floor((raised ?? 0) / 100)} raised diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index f3b7226d..cf91efd2 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -23,7 +23,7 @@ export default function Charity() { return ( - + <div className="mb-6 text-gray-500"> @@ -36,7 +36,7 @@ export default function Charity() { className="input input-bordered mb-6 w-full" /> </Col> - <div className="grid max-w-xl grid-flow-row grid-cols-1 gap-3 lg:max-w-full lg:grid-cols-2 xl:grid-cols-3"> + <div className="grid max-w-xl grid-flow-row grid-cols-1 gap-4 lg:max-w-full lg:grid-cols-2 xl:grid-cols-3"> {filterCharities.map((charity) => ( <div key={charity.name}> <CharityCard charity={charity} />