Permit user to update their own entry for free

This commit is contained in:
Austin Chen 2022-04-01 09:37:15 -07:00
parent 68fb5b578c
commit 98ab5e27c2

View File

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