import { Button, Box, Center, Spacer, HStack, FormControl, Input, Text, useDisclosure, InputGroup, InputRightElement, } from "@chakra-ui/react"; import { DeleteIcon } from "@chakra-ui/icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faShareAlt } from "@fortawesome/free-solid-svg-icons"; import SupportedDapps from "./SupportedDapps"; import AppUrlLabel from "./AppUrlLabel"; import ShareModal from "./ShareModal"; interface IFrameConnectTabParams { networkId: number; initIFrame: (_inputAppUrl?: string | undefined) => Promise; inputAppUrl: string | undefined; setInputAppUrl: (value: string | undefined) => void; appUrl: string | undefined; isIFrameLoading: boolean; setIsIFrameLoading: (value: boolean) => void; iframeKey: number; iframeRef: React.RefObject | null; showAddress: string; } function IFrameConnectTab({ networkId, initIFrame, setInputAppUrl, inputAppUrl, isIFrameLoading, appUrl, iframeKey, iframeRef, setIsIFrameLoading, showAddress, }: IFrameConnectTabParams) { const { isOpen, onOpen, onClose } = useDisclosure(); return ( <> setInputAppUrl(e.target.value)} /> {inputAppUrl && ( )} {appUrl && ( <> )}
{appUrl && ( setIsIFrameLoading(false)} /> )}
); } export default IFrameConnectTab;