Perform airdrop boilerplate
This commit is contained in:
parent
8b7c7ecb33
commit
b763ba9c9a
@ -40,11 +40,10 @@ function Addresses(props: AddressesProps) {
|
||||
}
|
||||
|
||||
var num;
|
||||
if (isNan(numTokens) || numTokens < 0) {
|
||||
if (isNaN(numTokens) || numTokens < 0) {
|
||||
num = 0;
|
||||
} else {
|
||||
num = numTokens;
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
@ -82,6 +81,10 @@ function AddressList({addressList}: AddressListProps) {
|
||||
function App() {
|
||||
const [addressList, setAddressList] = useState([]);
|
||||
|
||||
async function performAirdrop() {
|
||||
console.log("Performing airdrop");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
|
||||
@ -89,7 +92,7 @@ function App() {
|
||||
|
||||
<p>Add an address to airdrop to:</p>
|
||||
<Addresses addressList={addressList} setAddressListFn={setAddressList}/>
|
||||
<button disabled={addressList.length == 0}>Perform Airdrop!</button>
|
||||
<button disabled={addressList.length == 0} onClick={performAirdrop} >Perform Airdrop!</button>
|
||||
<AddressList addressList={addressList} />
|
||||
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user