We are using a react website with hash-router and the local URL looks something like this:
http://0.0.0.0:4321/#/
I want to always add a subpath for the URL and it should work something like this:
http://0.0.0.0:4321/somepath/#/
http://0.0.0.0:4321/somepath/#/somepage
I always want to have the URL in above format. While I have used base path in Hashrouter like this:
<HashRouter basename={'/somepath'}>
I am getting a URL in this format:
http://0.0.0.0:4321/#/somepath/
http://0.0.0.0:4321/#/somepath/somepage
Any changes that I have to do else where in the project to always have this path? I have tried to replicate this in a Sandbox: https://codesandbox.io/s/react-typescript-forked-jk8e9?file=/src/App.tsx, but it seems to not work properly.