(VIEWS.INITIAL_VIEW);
- const {
- account: address,
- connect,
- disconnect,
- chainId,
- } = useWallet();
+ const { account: address, connect, disconnect, chainId } = useWallet();
const { parcelNFTDetails, refetch } = useParcelNFT(PARCEL0_NFT_CONTRACT_ADDRESSES[chainId ?? 0]);
const allowance = parcelNFTDetails?.allowance || 0;
const walletAlreadyClaimed = parcelNFTDetails?.walletAlreadyClaimed || 0;
const totalSupply = parcelNFTDetails?.totalSupply || 0;
+ const claimPeriodStart = parcelNFTDetails?.claimPeriodStart || 0;
+ const claimPeriodEnd = parcelNFTDetails?.claimPeriodEnd || 0;
const onWalletDisconnect = async () => {
await disconnect();
@@ -84,11 +82,10 @@ const Home: NextPage = () => {
}
};
- //TODO trkaplan check what happens when you visit with a browser that does not have metamask
-
useEffect(() => {
// noinspection JSIgnoredPromiseFromCall
checkEligibility();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [address, parcelNFTDetails]);
const checkEligibility = async () => {
@@ -127,8 +124,7 @@ const Home: NextPage = () => {
70 HAIL BASIN RD, POWELL, WYOMING
- Claim ends in 45 Days 00 Hours{' '}
- {/* TODO trkaplan use countdown component */}
+
{address && (
<>
diff --git a/yarn.lock b/yarn.lock
index 420c33b..0164603 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2794,7 +2794,7 @@ ethereum-cryptography@^0.1.3:
secp256k1 "^4.0.1"
setimmediate "^1.0.5"
-ethereumjs-abi@0.6.8:
+ethereumjs-abi@^0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git":
version "0.6.8"
resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae"
integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==
@@ -4793,6 +4793,13 @@ raw-body@2.4.1:
iconv-lite "0.4.24"
unpipe "1.0.0"
+react-countdown@^2.3.2:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/react-countdown/-/react-countdown-2.3.2.tgz#4cc27f28f2dcd47237ee66e4b9f6d2a21fc0b0ad"
+ integrity sha512-Q4SADotHtgOxNWhDdvgupmKVL0pMB9DvoFcxv5AzjsxVhzOVxnttMbAywgqeOdruwEAmnPhOhNv/awAgkwru2w==
+ dependencies:
+ prop-types "^15.7.2"
+
react-dom@17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"