Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The Page component doesn't handle route change #742
The Discourse integration code needs to issue route changes in fl-maps. The reason is that, in Discourse, when the user opens a topic associated with a Page, then the fl-maps route needs to be changed to this Page.
The issue reported here occurs when the user is currently viewing a Page. When Discourse triggers a route change to a Page with a different Event id, the URL is changed but the Page is not refreshed. In other words, if you are on
I've made a small test: if, in a Page, you insert a link to another Page, then the link works as expected (i.e. the page is refreshed when clicking the link). That is surprising to me, as the Page code doesn't seem to handle refresh at all. So maybe I'm missing something.
Do I do something wrong? Or is the Page code needs to be worked on?
I assume it's because you are not telling react router to redirect to that page. Calling the path.history.push() will push an entry to the history stack.
If both options don't work try using component.
I can now confirm the issue lies in how the Page component is implemented: