From e036a7109707231c22f63a7c71d9fdc08513af9a Mon Sep 17 00:00:00 2001 From: Felipe Machado Date: Fri, 30 Sep 2022 00:46:01 +0900 Subject: [PATCH 1/9] Chore: Revert stripe changes --- src/firebase/firebase.js | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/firebase/firebase.js b/src/firebase/firebase.js index 5686c20..568316c 100644 --- a/src/firebase/firebase.js +++ b/src/firebase/firebase.js @@ -162,22 +162,15 @@ const savePaymentData = async (data) => { const getStripeApi = async (data) => { try { - // const stripeCheckout = - // window.location.hostname === "localhost" - // ? httpsCallable(getFunctions(app), "stripeCheckoutDev") - // : httpsCallable(getFunctions(app), "stripeCheckoutProd"); + const stripeCheckout = + window.location.hostname === "localhost" + ? httpsCallable(getFunctions(app), "stripeCheckoutDev") + : httpsCallable(getFunctions(app), "stripeCheckoutProd"); - // const STRIPE_PUBLIC_KEY = - // window.location.hostname === "localhost" - // ? "pk_test_51LhqIFAAHnMRTgmRLjs2aLphobC5OiVB6OhS2bXVAcoFuZJggH3uocLpU7cbwHOWs89wx33paIvgHeDEjcqiQaAs00dZO5xDtE" - // : "pk_live_51LhqIFAAHnMRTgmRuENJXYhrcJKNprQWWzUbCqtGJ1Zwg6AGfzmoE5w0wCJV8GZ8k8rTF4HVzKHuBQw9yEzxOH4E00eCeL7tXl"; - - const stripeCheckout = httpsCallable( - getFunctions(app), - "stripeCheckoutDev" - ); const STRIPE_PUBLIC_KEY = - "pk_test_51LhqIFAAHnMRTgmRLjs2aLphobC5OiVB6OhS2bXVAcoFuZJggH3uocLpU7cbwHOWs89wx33paIvgHeDEjcqiQaAs00dZO5xDtE"; + window.location.hostname === "localhost" + ? "pk_test_51LhqIFAAHnMRTgmRLjs2aLphobC5OiVB6OhS2bXVAcoFuZJggH3uocLpU7cbwHOWs89wx33paIvgHeDEjcqiQaAs00dZO5xDtE" + : "pk_live_51LhqIFAAHnMRTgmRuENJXYhrcJKNprQWWzUbCqtGJ1Zwg6AGfzmoE5w0wCJV8GZ8k8rTF4HVzKHuBQw9yEzxOH4E00eCeL7tXl"; const stripe = await loadStripe(STRIPE_PUBLIC_KEY); stripeCheckout(data).then((result) => { From d7bd366e0a0efe19ec90347192a07ea8997bfe27 Mon Sep 17 00:00:00 2001 From: Kim Date: Fri, 30 Sep 2022 09:31:20 +0900 Subject: [PATCH 2/9] Fix: Make SideBar icons white on selection --- src/components/SideBar.jsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/SideBar.jsx b/src/components/SideBar.jsx index 3548b18..e3da632 100644 --- a/src/components/SideBar.jsx +++ b/src/components/SideBar.jsx @@ -86,7 +86,13 @@ const SideBar = ({ storedTier, storedPayment, windowWidth }) => { : "text-gray-600" } flex items-center gap-4 text-sm px-4 py-3 rounded-lg`} > - + Support Tiers @@ -102,7 +108,13 @@ const SideBar = ({ storedTier, storedPayment, windowWidth }) => { : "text-gray-600" } flex items-center gap-4 text-sm px-4 py-3 rounded-lg`} > - + Order Confirmation From a923f260b8eda5ac9798757cff27d8f186f1f38a Mon Sep 17 00:00:00 2001 From: Kim Date: Fri, 30 Sep 2022 09:42:47 +0900 Subject: [PATCH 3/9] Fix: Change User Name to Full Name --- src/components/Registration.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Registration.jsx b/src/components/Registration.jsx index 0557a5f..0bb6b0a 100644 --- a/src/components/Registration.jsx +++ b/src/components/Registration.jsx @@ -71,15 +71,15 @@ function Registration() { htmlFor="user1" className="block mb-2 ml-1 text-sm font-medium text-gray-900 dark:text-white" > - Username + Full Name From e277cf072727944605c4753521c52de92c9cac70 Mon Sep 17 00:00:00 2001 From: Kim Date: Fri, 30 Sep 2022 09:57:46 +0900 Subject: [PATCH 4/9] Style: Make Tier Cards bigger --- src/pages/Tiers.jsx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/pages/Tiers.jsx b/src/pages/Tiers.jsx index dce5a74..b1faf6f 100644 --- a/src/pages/Tiers.jsx +++ b/src/pages/Tiers.jsx @@ -16,23 +16,22 @@ const Tiers = ({ setTier }) => { return (
-
-
-
+

Where your money goes

-
+
{data && tierCardData.map((tier) => { return ( From 7c201e4958988c2c11eff454bb472ae4e1bf7a94 Mon Sep 17 00:00:00 2001 From: Kim Date: Fri, 30 Sep 2022 10:15:09 +0900 Subject: [PATCH 5/9] Fix: Add justify-center to Header component for mobile headers --- src/components/Header.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Header.jsx b/src/components/Header.jsx index 67d878d..973fe53 100644 --- a/src/components/Header.jsx +++ b/src/components/Header.jsx @@ -10,7 +10,7 @@ const Header = ({ return (

From 2637dfedb3569c4a707f418bcc18f7555cc81363 Mon Sep 17 00:00:00 2001 From: Kim Date: Fri, 30 Sep 2022 10:22:10 +0900 Subject: [PATCH 6/9] Fix: Make Tiers page responsive on smaller mobile devices --- src/pages/Tiers.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Tiers.jsx b/src/pages/Tiers.jsx index b1faf6f..3a3bf4b 100644 --- a/src/pages/Tiers.jsx +++ b/src/pages/Tiers.jsx @@ -14,8 +14,8 @@ const Tiers = ({ setTier }) => { }, []); return ( -
-
+
+
Date: Fri, 30 Sep 2022 10:24:15 +0900 Subject: [PATCH 7/9] Fix: Add overflow class --- src/pages/Tiers.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Tiers.jsx b/src/pages/Tiers.jsx index 3a3bf4b..7ca38b4 100644 --- a/src/pages/Tiers.jsx +++ b/src/pages/Tiers.jsx @@ -14,7 +14,7 @@ const Tiers = ({ setTier }) => { }, []); return ( -
+
Date: Thu, 13 Oct 2022 11:53:48 +0900 Subject: [PATCH 8/9] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d6d630..a2700da 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Note: If you don't have `npm` installed, you'll need to do that first. ## Back end -The polyzero backend was built uysing Google Firebase. +The polyzero backend was built using Google Firebase. # OpenSource Contributions From c9801c705e73060450799cc54fe35df4c0156705 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 14 Oct 2022 09:53:04 +0900 Subject: [PATCH 9/9] Feat: Round all estimator results to whole kg --- src/pages/Results.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Results.jsx b/src/pages/Results.jsx index b370536..b4fb92c 100644 --- a/src/pages/Results.jsx +++ b/src/pages/Results.jsx @@ -28,7 +28,7 @@ const Results = ({ result, setResult }) => { const [footprint, setFootprint] = useState(result); function rounder(number) { - return Number(number.toFixed(2)); + return Number(number.toFixed(0)); } useEffect(() => {