Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Revert "Make new tab dashboard links work (#4276)"

Adam Rutkowski5fae58e5e704
diff --git a/assets/js/dashboard.js b/assets/js/dashboard.js
index 693e179866..a172b05264 100644
--- a/assets/js/dashboard.js
+++ b/assets/js/dashboard.js
@@ -31,8 +31,7 @@ if (container) {
background: container.dataset.background,
isDbip: container.dataset.isDbip === 'true',
flags: JSON.parse(container.dataset.flags),
- validIntervalsByPeriod: JSON.parse(container.dataset.validIntervalsByPeriod),
- shared: !!container.dataset.sharedLinkAuth,
+ validIntervalsByPeriod: JSON.parse(container.dataset.validIntervalsByPeriod)
}
const loggedIn = container.dataset.loggedIn === 'true'
diff --git a/assets/js/dashboard/router.js b/assets/js/dashboard/router.js
index 0d6318131b..4605c9fd15 100644
--- a/assets/js/dashboard/router.js
+++ b/assets/js/dashboard/router.js
@@ -27,10 +27,9 @@ function ScrollToTop() {
}
export default function Router({ site, loggedIn, currentUserRole }) {
- console.info('xxx', site);
return (
- <BrowserRouter basename={site.shared ? `/share/${encodeURI(site.domain)}` : encodeURI(site.domain)}>
- <Route path="/">
+ <BrowserRouter>
+ <Route path="/:domain">
<ScrollToTop />
<Dash site={site} loggedIn={loggedIn} currentUserRole={currentUserRole} />
<Switch>
@@ -53,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} />
@@ -72,7 +71,7 @@ export default function Router({ site, loggedIn, currentUserRole }) {
</Route>
</Switch>
</Route>
- </BrowserRouter >
+ </BrowserRouter>
);
}