Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigating to a route directly does not redirect to add the # #495

Open
phutchins opened this issue Nov 10, 2021 · 2 comments
Open

Navigating to a route directly does not redirect to add the # #495

phutchins opened this issue Nov 10, 2021 · 2 comments
Labels
app Frontend issues enhancement New feature or request

Comments

@phutchins
Copy link
Contributor

When navigating to https://grants.gtcdao.net/review/, an error is displayed.

Expected behavior:

  • The router should attempt to redirect to https://grants.gtcdao.net/#/review/
  • If the route does not exist, we should show a nicely designed error page
  • If the route does exist, we should show the page
@phutchins phutchins added enhancement New feature or request app Frontend issues GR12 Scoped for the GR12 Grant Round release labels Nov 10, 2021
@aj-maz
Copy link
Member

aj-maz commented Nov 12, 2021

I studied this issue and I think it is not fixable by only fixing the app. I think it has 2 parts, one is fixing the router for the app, but the second one is in the way that the app is deployed.
When we go to https://grants.gtcdao.net/review/ it won't render the app at all, we should somehow manage to redirect them before hitting the app, or we should make that like no matter what route always renders the app. And base on how we solve this the solution needed to be implemented in the app would be different. For example, if we could manage to be able to redirect users to https://grants.gtcdao.net/#/review/ before hitting the app we could change nothing in the app and it would be fine since we already have a nice 404 page like this: https://grants.gtcdao.net/#/re123 .
I think before changing anything in the app we should find what is our possibilities in the deployment layer then we could find possible solutions.

@mds1
Copy link
Contributor

mds1 commented Nov 12, 2021

@phutchins Just so you know this is the expected behavior with hash mode enabled on the router—the app will not redirect, and you are supposed to navigate to https://grants.gtcdao.net/#/review/

The best we can do is have https://grants.gtcdao.net/something just load the home page instead (I'm not sure how do this offhand, but it should be possible). AFAIK you can't modify that URL to https://grants.gtcdao.net/#/something as proposed in the issue description

Note this is also how Uniswap behaves—https://app.uniswap.org/pool loads the home page, but https://app.uniswap.org/#/pool loads the pools page

@phutchins phutchins removed the GR12 Scoped for the GR12 Grant Round release label Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Frontend issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants