blockscout / frontend

Front-end application for Blockscout
https://blockscout.com
GNU General Public License v3.0
160 stars 432 forks source link

`View all results` button in search results opens a page from `check-redirect` #2077

Closed yvaskov closed 1 month ago

yvaskov commented 3 months ago

Description

If /api/v2/search/check-redirect returns a result for the search query, View all results button redirects to that page instead of opening Search results page.

Image

Steps to reproduce

  1. Open https://eth.blockscout.com/
  2. Search for 123 or vitalik.eth
  3. Click on View all results

Version

v1.32.0

isstuev commented 3 months ago

@NikitaSavik @ulyanas what would be the right scenario here?

"view all" links to the search results page, that has a redirect check. API returns redirect to the block page so we redirect user there. Pressing "enter" does the same. If we want for some reason to have different behavior for "enter" and "view all" we can implement some url param for example, but would it make sense?

does it look ok for a user that we have redirect here? If I type "123" and see tokens in the first 10 results and press enter -- I will be redirected to the "123" block page.