diff --git a/src/components/Body/index.tsx b/src/components/Body/index.tsx index 0ea77d3..7b4634a 100644 --- a/src/components/Body/index.tsx +++ b/src/components/Body/index.tsx @@ -81,12 +81,13 @@ const TD = ({ txt }: { txt: string }) => ( function Body() { const { colorMode } = useColorMode(); const bgColor = { light: "white", dark: "gray.700" }; + const addressFromURL = new URLSearchParams(window.location.search).get("address"); const toast = useToast(); const { onOpen, onClose, isOpen } = useDisclosure(); const { isOpen: tableIsOpen, onToggle: tableOnToggle } = useDisclosure(); const [provider, setProvider] = useState(); - const [showAddress, setShowAddress] = useState(""); // gets displayed in input. ENS name remains as it is + const [showAddress, setShowAddress] = useState(addressFromURL ?? ""); // gets displayed in input. ENS name remains as it is const [address, setAddress] = useState(""); // internal resolved address const [isAddressValid, setIsAddressValid] = useState(true); const [uri, setUri] = useState("");