Skip to content

Commit

Permalink
Manage isFetching condition to change button color
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabl0cks committed Apr 18, 2024
1 parent b661e06 commit d0565c8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/nextjs/app/_components/ApplyEligibilityLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ export const ApplyEligibilityLink = () => {
const { isConnected, address: connectedAddress } = useAccount();
const { isBuilderPresent, isLoading: isFetchingBuilderData } = useBGBuilderData(connectedAddress);

const applyButtonColor = !isConnected
? "btn-primary disabled"
: !isBuilderPresent
? "btn-warning disabled"
: "btn-success";
const applyButtonColor =
!isConnected || isFetchingBuilderData
? "btn-primary disabled"
: !isBuilderPresent
? "btn-warning disabled"
: "btn-success";

const notConnectedMessage = (
<div className="leading-snug">
<p className="">
<p>
🔎 <strong>Connect your wallet</strong> to verify whether you qualify to apply or not.
</p>
</div>
Expand Down

0 comments on commit d0565c8

Please sign in to comment.