Skip to content

Commit

Permalink
Fix coming soon problems
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Jun 19, 2024
1 parent 3f29e10 commit 062becb
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ const Component: React.FC<Props> = ({ className, currentAirdrop }: Props) => {
const now = Date.now();
const shouldCheck = currentAirdrop?.start_claim && new Date(currentAirdrop?.start_claim).getTime() < now;

if (shouldCheck && eligibility && eligibility.currentProcess && eligibility.eligibility) {
if (!shouldCheck) {
return buttonTypeConst.COMING_SOON;
}

if (eligibility && eligibility.currentProcess && eligibility.eligibility) {
switch (eligibility.currentProcess) {
case AirdropCampaignProcess.ELIGIBLE:
return buttonTypeConst.ELIGIBLE;
Expand All @@ -167,7 +171,7 @@ const Component: React.FC<Props> = ({ className, currentAirdrop }: Props) => {
return buttonTypeConst.ELIGIBLE;
}
} else {
return buttonTypeConst.COMING_SOON;
return buttonTypeConst.INELIGIBLE;
}
})();

Expand All @@ -184,7 +188,6 @@ const Component: React.FC<Props> = ({ className, currentAirdrop }: Props) => {
setIsLoadingRaffle(false);
console.log('error', error);
}

}, [activeModal, currentAirdrop.airdrop_campaign_id]);

const onCancel = useCallback(() => {
Expand Down

0 comments on commit 062becb

Please sign in to comment.