hackla-engage / engage-client

13 stars 31 forks source link

Remove `/#/` in site URL #196

Open TeddyCr opened 4 years ago

TeddyCr commented 4 years ago

@hackla-engage/frontend-engineers is it possible to remove the /#/ in the URL of the site? If not would you be able to explain why it is included?

Thank you. :)

ldaws003 commented 4 years ago

@TeddyCr Not sure you can remove it. It is from the createHashHistory function in the configureStore.dev.js file. I replaced it with createBrowserHistory but when I tried to go to the agenda feed, I got an error unless I went to the homepage and clicked the link to go there.

ldaws003 commented 4 years ago

@TeddyCr We could make it so that whenever someone tries to go to any other page than the home page, they would be redirected to the app and then send a json response containing the pathname and have the app redirect to that.

Such as when someone types and then go to engage.town/feed the backend would redirected them to engage.town and send a json telling the fronted to render the feed using the history api.

This would allow browser history to act normally. Any thoughts?