Skip to content

Commit

Permalink
Make new tab dashboard links work
Browse files Browse the repository at this point in the history
  • Loading branch information
aerosol committed Jun 25, 2024
1 parent 58a66a9 commit 32d8d58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/js/dashboard/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function ScrollToTop() {

export default function Router({ site, loggedIn, currentUserRole }) {
return (
<BrowserRouter>
<Route path="/:domain">
<BrowserRouter basename={site.domain}>
<Route path="/">
<ScrollToTop />
<Dash site={site} loggedIn={loggedIn} currentUserRole={currentUserRole} />
<Switch>
Expand All @@ -52,7 +52,7 @@ export default function Router({ site, loggedIn, currentUserRole }) {
<ExitPagesModal site={site} />
</Route>
<Route path="/:domain/countries">
<ModalTable title="Top countries" site={site} endpoint={url.apiPath(site, '/countries')} filterKey="country" keyLabel="Country" renderIcon={renderCountryIcon} showPercentage={true}/>
<ModalTable title="Top countries" site={site} endpoint={url.apiPath(site, '/countries')} filterKey="country" keyLabel="Country" renderIcon={renderCountryIcon} showPercentage={true} />
</Route>
<Route path="/:domain/regions">
<ModalTable title="Top regions" site={site} endpoint={url.apiPath(site, '/regions')} filterKey="region" keyLabel="Region" renderIcon={renderRegionIcon} />
Expand All @@ -71,7 +71,7 @@ export default function Router({ site, loggedIn, currentUserRole }) {
</Route>
</Switch>
</Route>
</BrowserRouter>
</BrowserRouter >
);
}

Expand Down

0 comments on commit 32d8d58

Please sign in to comment.