From 558452ac4997b92050ef706e63c2a921b1135aa4 Mon Sep 17 00:00:00 2001 From: rivques <38469076+rivques@users.noreply.github.com> Date: Tue, 18 Jun 2024 20:22:10 -0400 Subject: [PATCH] switch head image and remove "prelaunch site" from footer of arcade (#1240) * remove "prelaunch site" from footor of arcade * switch to newer head image * hide buy button/quantity dropdown if richness is low * re-add link to power hour --------- Co-authored-by: Max Wofford --- components/arcade/footer.js | 2 +- components/arcade/prizes.js | 37 ++++++++++++++++----------- components/arcade/shop-component.js | 1 + pages/arcade/[userAirtableID]/shop.js | 2 +- pages/arcade/index.js | 2 +- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/components/arcade/footer.js b/components/arcade/footer.js index b5c8116f..7ee26bcf 100644 --- a/components/arcade/footer.js +++ b/components/arcade/footer.js @@ -7,7 +7,7 @@ const Description = () => ( A project by Hack Club. - Prelaunch site. + Previous edition: Power Hour Hack Club is a registered 501(c)3 nonprofit organization that supports a diff --git a/components/arcade/prizes.js b/components/arcade/prizes.js index dbb5af1d..9f6fbf4c 100644 --- a/components/arcade/prizes.js +++ b/components/arcade/prizes.js @@ -16,6 +16,7 @@ const Prizes = ({ quantity, onQuantityChange, index, + hoursBalance, ...props }) => { const parsedFulfillmentDesc = fulfillmentDescription?.replace( @@ -86,24 +87,30 @@ const Prizes = ({ variant="caption" sx={{ color: '#FFEEC6', mt: 0, mb: 2 }} > - You can order {quantity} of these + You can order up to {quantity} of these - - + {// only show the quantity dropdown if you have enough hours to buy at least 2 of the item + hoursBalance / cost < 2 ? (null) : + } + { + // only show the buy button if you have enough hours to buy at least 1 of the item + hoursBalance / cost < 1 ? (null) : + + } )} diff --git a/components/arcade/shop-component.js b/components/arcade/shop-component.js index e3afc11a..98019d2a 100644 --- a/components/arcade/shop-component.js +++ b/components/arcade/shop-component.js @@ -92,6 +92,7 @@ export default function ShopComponent({ key={item.id} id={item.id} onQuantityChange={(id, q) => handleQuantityChange(item.id, q)} // Pass handler to update quantity + hoursBalance={hoursBalance} /> ))} diff --git a/pages/arcade/[userAirtableID]/shop.js b/pages/arcade/[userAirtableID]/shop.js index 42c1597d..768b1b6c 100644 --- a/pages/arcade/[userAirtableID]/shop.js +++ b/pages/arcade/[userAirtableID]/shop.js @@ -52,7 +52,7 @@ export default function Shop({ availableItems, userAirtableID = null, hoursBalan Your current balance is {Math.floor(hoursBalance)} 🎟️ - + ) } diff --git a/pages/arcade/index.js b/pages/arcade/index.js index 8409aa55..5c153ad5 100644 --- a/pages/arcade/index.js +++ b/pages/arcade/index.js @@ -928,7 +928,7 @@ const Arcade = ({ as={Head} title="Arcade" description="The ultimate summer hackathon for high schoolers. Make projects. Track your hours. Redeem for Prizes." - image="https://cloud-luaw423i2-hack-club-bot.vercel.app/0frame_33__1_.png" + image="https://cloud-249autgay-hack-club-bot.vercel.app/0frame_70.png" />