Hide ENS label when network does not support it

This commit is contained in:
Willian Mitsuda 2022-02-18 03:39:37 -03:00
parent 288f6c92cd
commit 33839eb5ef
2 changed files with 6 additions and 2 deletions

View File

@ -44,7 +44,9 @@ const Header: React.FC = () => {
className="w-full border-t border-b border-l rounded-l focus:outline-none px-2 py-1 text-sm"
type="text"
size={60}
placeholder='Type "/" to search by address / txn hash / block number / ENS name'
placeholder={`Type "/" to search by address / txn hash / block number${
provider?.network.ensAddress ? " / ENS name" : ""
}`}
onChange={handleChange}
ref={searchRef}
/>

View File

@ -39,7 +39,9 @@ const Home: React.FC = () => {
className="w-full border-l border-t border-b rounded-l focus:outline-none px-2 py-1"
type="text"
size={50}
placeholder="Search by address / txn hash / block number / ENS name"
placeholder={`Search by address / txn hash / block number${
provider?.network.ensAddress ? " / ENS name" : ""
}`}
onChange={handleChange}
ref={searchRef}
autoFocus