Merge pull request #221 from mikecao/dev

Fix issue with share url links.
This commit is contained in:
Mike Cao 2020-09-26 00:28:50 -07:00 committed by GitHub
commit 86c76c98c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -37,6 +37,7 @@ export default function WebsiteDetails({ websiteId, token }) {
const [eventsData, setEventsData] = useState(); const [eventsData, setEventsData] = useState();
const { const {
resolve, resolve,
router,
query: { view }, query: { view },
} = usePageQuery(); } = usePageQuery();
@ -44,7 +45,7 @@ export default function WebsiteDetails({ websiteId, token }) {
<Link <Link
key="back-button" key="back-button"
className={styles.backButton} className={styles.backButton}
href="/website/[...id]" href={router.pathname}
as={resolve({ view: undefined })} as={resolve({ view: undefined })}
icon={<Arrow />} icon={<Arrow />}
size="small" size="small"

View File

@ -32,6 +32,7 @@ export default function MetricsTable({
const { startDate, endDate, modified } = dateRange; const { startDate, endDate, modified } = dateRange;
const { const {
resolve, resolve,
router,
query: { url }, query: { url },
} = usePageQuery(); } = usePageQuery();
@ -108,7 +109,7 @@ export default function MetricsTable({
{limit && ( {limit && (
<Link <Link
icon={<Arrow />} icon={<Arrow />}
href="/website/[...id]" href={router.pathname}
as={resolve({ view: type })} as={resolve({ view: type })}
size="small" size="small"
iconRight iconRight

View File

@ -1,6 +1,6 @@
{ {
"name": "umami", "name": "umami",
"version": "0.54.0", "version": "0.55.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ", "description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",