It's unclear to me how I should go about this. I want a page on the website to have all links in the entire website in a tree like structure. How can I approach this problem?
you can use react-router-sitemap package.
as the documentation explains:
After running the script, a sitemap.xml file will be created, which includes all paths, described in the configuration of react-router