diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index a53698a..50b329e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,24 +1,64 @@ -import React from 'react'; +import React, {useState} from 'react'; import logo from './logo.svg'; import './App.css'; +interface AddressesProps { + addressList: string[]; + setAddressListFn: any; +} + +function Addresses(props: AddressesProps) { + const [inputState, setInputState] = useState(""); + const { setAddressListFn, addressList } = props; + + const save = () => { + console.log(inputState); + //TODO check if correct address format + if (addressList.includes(inputState)) { + //Do nothing + } else { + setAddressListFn([...addressList, inputState]); + } + setInputState(""); + } + return ( +
No addresses specified yet
: + addressList.map((addr: string) =>
- Edit src/App.tsx
and save to reload.
-
Add an address to airdrop to:
+