From 860cf94c0b8f2d04231425d799792dcd7e6e3149 Mon Sep 17 00:00:00 2001 From: Rodrigo Branas Date: Sat, 14 Sep 2024 15:51:01 -0300 Subject: [PATCH] fix: fixing link when search for blocks and adding labels for hash and height (#520) --- .../Core/components/Search/SearchInput.tsx | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx b/packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx index e03c64db..ff097628 100644 --- a/packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx +++ b/packages/app-explorer/src/systems/Core/components/Search/SearchInput.tsx @@ -127,33 +127,38 @@ const SearchResultDropdown = forwardRef( )} {searchResult?.block && ( <> - Block - - - {shortAddress(searchResult.block.id || '', trimL, trimR)} - - - - - {searchResult.block.height} - - + {searchResult.block.id && ( + <> + Block Hash + + + {shortAddress( + searchResult.block.id || '', + trimL, + trimR, + )} + + + + )} + {searchResult.block.height && ( + <> + Block Height + + + {searchResult.block.height} + + + + )} )} {searchResult?.contract && (