From 902f165aecb9223369e62c045d11a35e8ca29f19 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 25 Apr 2022 23:22:49 -0400 Subject: [PATCH] Set images to object contain --- web/components/charity/charity-card.tsx | 2 +- web/pages/charity/[charitySlug].tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/components/charity/charity-card.tsx b/web/components/charity/charity-card.tsx index e0ba6466..c126c8c2 100644 --- a/web/components/charity/charity-card.tsx +++ b/web/components/charity/charity-card.tsx @@ -14,7 +14,7 @@ export function CharityCard(props: { charity: Charity }) {
- {photo && } + {photo && }

{name}

diff --git a/web/pages/charity/[charitySlug].tsx b/web/pages/charity/[charitySlug].tsx index 5e00eaf2..ad13601e 100644 --- a/web/pages/charity/[charitySlug].tsx +++ b/web/pages/charity/[charitySlug].tsx @@ -53,7 +53,13 @@ function CharityPage(props: { charity: Charity }) { {/* TODO: donations over time chart */} <Row className="justify-between"> - {photo && <img src={photo} alt="" className="w-40 rounded-2xl" />} + {photo && ( + <img + src={photo} + alt="" + className="w-40 rounded-2xl object-contain" + /> + )} <Details charity={charity} totalRaised={totalRaised}