Skip to content

Commit

Permalink
OG NFT UI: UX improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
akiraonstarknet committed Sep 20, 2024
1 parent e8e36c5 commit 2d128b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn run lint:fix && yarn run format:fix
yarn run lint:fix && yarn run format:fix && git add .
10 changes: 7 additions & 3 deletions src/app/community/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const CommunityPage = () => {
],
});

const { data: ogNFTBalance } = useContractRead({
const { data: ogNFTBalance, status: balanceQueryStatus } = useContractRead({
abi: NFTAbi,
address: process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '0',
functionName: 'balanceOf',
Expand Down Expand Up @@ -353,7 +353,8 @@ const CommunityPage = () => {
hasNFT ||
isOGNFTLoading ||
!isOGNFTEligible.data ||
isClaimOGNFTPending
isClaimOGNFTPending ||
!address
}
>
<Text fontSize={{ base: '10px', md: '14px' }} color="white">
Expand All @@ -363,6 +364,9 @@ const CommunityPage = () => {
</Box>
) : !address ? (
'Connect wallet to check eligibility'
) : isOGNFTEligible.isLoading ||
balanceQueryStatus == 'pending' ? (
<Spinner size="sm" />
) : hasNFT ? (
'Claimed'
) : !isEligible ? (
Expand Down Expand Up @@ -467,7 +471,7 @@ const CommunityPage = () => {
margin="0 25px"
border="1px solid var(--chakra-colors-color2_65p)"
>
<ModalCloseButton color="white" onClick={onClose} />
<ModalCloseButton color="white" />
<ModalBody
display="flex"
flexDirection="column"
Expand Down

0 comments on commit 2d128b9

Please sign in to comment.