From 2e578a7af828c9ee199e6cf0eb17263336992486 Mon Sep 17 00:00:00 2001 From: Bouncey Date: Mon, 3 Dec 2018 17:47:30 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Handle=20goal=20reached=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Supporters.js | 31 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/client/src/components/Supporters.js b/client/src/components/Supporters.js index 192717add5..7ab7b0b662 100644 --- a/client/src/components/Supporters.js +++ b/client/src/components/Supporters.js @@ -17,22 +17,33 @@ const supportersLocale = supporterGoal.toLocaleString(); function Supporters({ isDonating, activeDonations }) { const donationsLocale = activeDonations.toLocaleString(); + const isGoalReached = activeDonations >= supporterGoal; return (

Support an open future.

- -
- -
- - {donationsLocale} supporters out of {supportersLocale} supporter - goal - + {isGoalReached ? ( + + +

+ 🎉 {donationsLocale} supporters help keep freeCodeCamp.org free to + use +

+
+ ) : ( + +
+ +
+ + {donationsLocale} supporters out of {supportersLocale} supporter + goal + +
-
- + + )}