Skip to content

Commit

Permalink
Update redeem-sweeps-buttons.tsx (#2894)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSaltyy authored Sep 20, 2024
1 parent 695b59f commit 0b9089b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web/components/profile/redeem-sweeps-buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export function RedeemSweepsButtons(props: { user: User; className?: string }) {
const redeemableCash = redeemable?.redeemablePrizeCash ?? 0
const router = useRouter()

const canRedeem = redeemableCash > 0 && !blockFromSweepstakes(user)
const canRedeem = user.sweepstakesVerified && !blockFromSweepstakes(user)

const amount = useKYCGiftAmount(user)
const kycGift = useKYCGiftAmount(user)

const onClick = () => {
router.push('/redeem')
Expand All @@ -25,23 +25,23 @@ export function RedeemSweepsButtons(props: { user: User; className?: string }) {
{canRedeem ? (
<Button onClick={onClick} color={'amber'} className={className}>
Redeem
<CoinNumber
{redeemableCash && <CoinNumber
amount={redeemableCash}
className={'ml-1'}
coinType={'sweepies'}
/>
/>}
</Button>
) : (
<Button onClick={onClick} color={'amber'} className={className}>
Claim
{amount == undefined ? (
{kycGift == undefined ? (
<CoinNumber
amount={KYC_VERIFICATION_BONUS_CASH}
coinType="CASH"
className="ml-1"
/>
) : (
<CoinNumber amount={amount} coinType="CASH" className="ml-1" />
<CoinNumber amount={kycGift} coinType="CASH" className="ml-1" />
)}
</Button>
)}
Expand Down

0 comments on commit 0b9089b

Please sign in to comment.