From 33839eb5efc8b2f113f74bdd45baa8833efc75d3 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Fri, 18 Feb 2022 03:39:37 -0300 Subject: [PATCH] Hide ENS label when network does not support it --- src/Header.tsx | 4 +++- src/Home.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Header.tsx b/src/Header.tsx index 251e584..7feec16 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -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} /> diff --git a/src/Home.tsx b/src/Home.tsx index 8781549..2bcb23d 100644 --- a/src/Home.tsx +++ b/src/Home.tsx @@ -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