diff --git a/components/containers/AddressContainer.tsx b/components/containers/AddressContainer.tsx index 2d2794a..7d3888a 100644 --- a/components/containers/AddressContainer.tsx +++ b/components/containers/AddressContainer.tsx @@ -9,10 +9,11 @@ interface Props { displayModal: () => void; setRecipients: Dispatch>; holderAddresses?: string[]; + isFriendTech?: boolean; } const AddressContainer = (props: Props) => { - const { show, isERC721, tokenSymbol, displayModal, setRecipients, holderAddresses } = props; + const { show, isERC721, tokenSymbol, displayModal, setRecipients, holderAddresses, isFriendTech } = props; const [showCSVUpload, setShowCSVUpload] = useState(false); @@ -49,7 +50,7 @@ const AddressContainer = (props: Props) => { className="underline text-left smallertText text-black" onClick={() => setShowCSVUpload(true)} > - Or upload a CSV + {isFriendTech ? "" : "Or upload a CSV"} ); diff --git a/components/containers/FriendtechContainer.tsx b/components/containers/FriendtechContainer.tsx index c98ef43..99a2087 100644 --- a/components/containers/FriendtechContainer.tsx +++ b/components/containers/FriendtechContainer.tsx @@ -31,7 +31,7 @@ interface Props { handleTokenAddressChange: (e: ChangeEvent) => void; resetForm: () => void; setErrorMessage: Dispatch>; - setOpenModal: Dispatch>; + setOpenModal: Dispatch>; setRecipients: Dispatch>; } @@ -116,7 +116,7 @@ const FriendtechContainer = (props: Props) => { {openModal === "confirm" && ( setOpenModal(val ? "confirm" : false)} + setIsOpen={(val) => setOpenModal(val ? "confirm" : '')} symbol="ETH" recipients={parsedRecipients} balanceData={balance} @@ -139,7 +139,7 @@ const FriendtechContainer = (props: Props) => { isOpen={openModal === "congrats"} setIsOpen={(val) => { resetForm(); - setOpenModal(val ? "congrats" : false); + setOpenModal(val ? "congrats" : ''); }} resetForm={resetForm} /> @@ -192,6 +192,7 @@ const FriendtechContainer = (props: Props) => { displayModal={displayModal} setRecipients={setRecipients} holderAddresses={holders} + isFriendTech /> ); } diff --git a/components/providers/FriendtechProvider.tsx b/components/providers/FriendtechProvider.tsx index c7a78ac..8263a8a 100644 --- a/components/providers/FriendtechProvider.tsx +++ b/components/providers/FriendtechProvider.tsx @@ -19,7 +19,7 @@ export default function Friendtech(props: IAirdropEthProps) { (contractAddress as Address) || "" ); const [recipients, setRecipients] = useState<[string, string][]>([]); - const [openModal, setOpenModal] = useState(null); + const [openModal, setOpenModal] = useState(""); const [loadingMessage, setLoadingMessage] = useState(false); const [errorMessage, setErrorMessage] = useState(false); diff --git a/components/types/modals.ts b/components/types/modals.ts index 48a6ea3..a89a2d8 100644 --- a/components/types/modals.ts +++ b/components/types/modals.ts @@ -1 +1 @@ -export type ModalSelector = 'confirm' | 'congrats'; +export type ModalSelector = 'confirm' | 'congrats' | '';