react router append root to path code example
Example: react router base url
<BrowserRouter basename="/calendar"/>
<Link to="/today"/> // renders <a href="/calendar/today">
<BrowserRouter basename="/calendar"/>
<Link to="/today"/> // renders <a href="/calendar/today">