get base url in react 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">