chanzuckerberg / galago

Interpretation aids for genomic epidemiology
https://chanzuckerberg.github.io/galago/
MIT License
8 stars 3 forks source link

[Bug] If no tree data, return to upload / landing page #142

Closed sidneymbell closed 2 years ago

sidneymbell commented 2 years ago

Describe the bug If you try to go to galago/App without a valid tree being uploaded, it just shows a blank page. It should instead just route back to the landing page.

Additional context I tried putting a conditional into App.tsx such that it would use react router's navigate back to the landing page if (!state.tree) but got an error about how you weren't supposed to call navigate in the initial render of your component.

sidneymbell commented 2 years ago

Worst case scenario -- force the user back to the root using the window something or other. Or might be able to achieve this with useEffect