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 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 (

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 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 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) => { 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(() => { diff --git a/src/pages/Tiers.jsx b/src/pages/Tiers.jsx index dce5a74..7ca38b4 100644 --- a/src/pages/Tiers.jsx +++ b/src/pages/Tiers.jsx @@ -14,25 +14,24 @@ const Tiers = ({ setTier }) => { }, []); return ( -
-
-
-
-
+
+
+

Where your money goes

-
+
{data && tierCardData.map((tier) => { return (