From 98ab5e27c2d564ecbea40d0d7787680f4c96f0f1 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Fri, 1 Apr 2022 09:37:15 -0700 Subject: [PATCH] Permit user to update their own entry for free --- web/components/manaboard.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/components/manaboard.tsx b/web/components/manaboard.tsx index 2e7376c0..e483c880 100644 --- a/web/components/manaboard.tsx +++ b/web/components/manaboard.tsx @@ -139,6 +139,7 @@ export function BuySlotModal(props: { const userExists = allSlots.find( (u, index) => u.id === user?.id && index + 1 !== slot ) + // Hm, existing leaderboard users may not be able to participate atm. const errorMsg = userExists ? 'Sell your other slot first (by revaluing it to M$ 0)' : '' @@ -164,7 +165,9 @@ export function BuySlotModal(props: { const fakeBalance = loadFakeBalance() const noFundsMsg = - value > fakeBalance ? `You only have ${formatMoney(fakeBalance)}!` : '' + value > fakeBalance && holder.id !== user?.id + ? `You only have ${formatMoney(fakeBalance)}!` + : '' return ( <>