File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,12 @@ const Component: React.FC<Props> = ({ children, className }) => {
126126 } , [ metadata ?. enable_substrate , metadata ?. enable_evm ] )
127127
128128 const handleSearch = ( e : KeyboardEvent < HTMLInputElement > ) => {
129- if ( e . key === 'Enter' && value . trim ( ) ) {
129+ if ( e . key === 'Enter' ) {
130+ handleRedirect ( )
131+ }
132+ }
133+ const handleRedirect = ( ) => {
134+ if ( value . trim ( ) ) {
130135 switch ( type [ 0 ] ) {
131136 case 'sub_block' :
132137 router . push ( `/sub/block/${ value . trim ( ) } ` )
@@ -399,7 +404,7 @@ const Component: React.FC<Props> = ({ children, className }) => {
399404 < Divider orientation = "vertical" className = 'mx-4' />
400405 </ div >
401406 }
402- endContent = { < SearchIcon fill = "none" size = { 24 } className = "mr-3" /> }
407+ endContent = { < SearchIcon fill = "none" size = { 24 } onClick = { handleRedirect } className = "mr-3 cursor-pointer " /> }
403408 />
404409 </ div >
405410 </ div >
You can’t perform that action at this time.
0 commit comments