From 494702e05e5c473b6757e9256888388a3babe5f2 Mon Sep 17 00:00:00 2001 From: Shannon Tenner Date: Wed, 15 Jan 2025 13:22:45 +0200 Subject: [PATCH] check for gems for bonus tier --- .../sections/LoggedIn/segments/Flare/Flare.tsx | 4 ++-- .../airdrop/stateHelpers/useAirdropUserPointsListener.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/containers/main/Airdrop/AirdropGiftTracker/sections/LoggedIn/segments/Flare/Flare.tsx b/src/containers/main/Airdrop/AirdropGiftTracker/sections/LoggedIn/segments/Flare/Flare.tsx index 01fb27f4d..6cd5f929e 100644 --- a/src/containers/main/Airdrop/AirdropGiftTracker/sections/LoggedIn/segments/Flare/Flare.tsx +++ b/src/containers/main/Airdrop/AirdropGiftTracker/sections/LoggedIn/segments/Flare/Flare.tsx @@ -3,7 +3,7 @@ import FriendAccepted from './FriendAccepted/FriendAccepted'; import GoalComplete from './GoalComplete/GoalComplete'; import { Wrapper } from './styles'; import { useAirdropStore } from '@app/store/useAirdropStore.ts'; -import { useCallback, useEffect } from 'react'; +import { useEffect } from 'react'; interface Props { gems: number; @@ -40,7 +40,7 @@ export default function Flare({ gems, animationType }: Props) { exit={{ opacity: 0 }} onClick={() => setFlareAnimationType()} > - {animationType === 'GoalComplete' && } + {animationType === 'GoalComplete' && gems > 0 && } {animationType === 'FriendAccepted' && } {animationType === 'BonusGems' && } diff --git a/src/hooks/airdrop/stateHelpers/useAirdropUserPointsListener.ts b/src/hooks/airdrop/stateHelpers/useAirdropUserPointsListener.ts index 7810f93e7..bf787c3ee 100644 --- a/src/hooks/airdrop/stateHelpers/useAirdropUserPointsListener.ts +++ b/src/hooks/airdrop/stateHelpers/useAirdropUserPointsListener.ts @@ -17,7 +17,7 @@ export const useAirdropUserPointsListener = () => { setFlareAnimationType('FriendAccepted'); const goalComplete = bonusTiers?.find((t) => t.target === incomingReferralData?.count); - if (goalComplete) { + if (goalComplete && goalComplete.bonusGems) { setTimeout(() => setFlareAnimationType('GoalComplete'), 3000); }