Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit c63b8bc

Browse files
committed
Show remaining token count on mint page
1 parent b23749a commit c63b8bc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

frontend/public/locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"connectWalletText": "Connect Wallet",
3131
"ethereumNetworkPrompt": "Please Connect to the Ethereum Mainnet",
3232
"availableTokensText": "View the available Token IDs",
33+
"remainingTokensText": "We have {{remainingTokens}} Tokens left",
3334
"mintPageHeader": "DEVS Token Minter",
3435
"projectsList": "A list of community projects created by the Developer DAO community.",
3536
"ddaoTokenSearch": "DDAO Token Search",

frontend/src/components/DirectMint/DirectMintBox.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import {
1212
} from '@chakra-ui/react';
1313
import { useTranslation } from 'next-i18next';
1414
import { TOKEN_FINDER_URL } from '../../utils/DeveloperDaoConstants';
15+
import useDevNFTSupply from '../../hooks/useDevNFTSupply';
1516

1617
// Layout for the Direct Mint Box
1718
// used on the minting page
1819
const DirectMintBox = () => {
1920
const { t } = useTranslation();
21+
const { loading, remainingPublicSupply } = useDevNFTSupply();
2022
return (
2123
<>
2224
<Container maxW="container.md" centerContent>
@@ -37,6 +39,11 @@ const DirectMintBox = () => {
3739
{t('here')}
3840
</Link>
3941
</Text>
42+
<Text fontSize={{ base: 'xs', sm: 'xl' }}>
43+
{t('remainingTokensText', {
44+
remainingTokens: loading ? '...' : remainingPublicSupply,
45+
})}
46+
</Text>
4047
<DirectMint />
4148
</Stack>
4249
</Box>

0 commit comments

Comments
 (0)