mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 02:06:19 +01:00
Add link to pages view.
This commit is contained in:
parent
b97f582c90
commit
52456429f6
@ -28,6 +28,15 @@ export default function RealtimeViews({ websiteId, data, websites }) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const renderLink = ({ x }) => {
|
||||||
|
const domain = x.startsWith('/') ? getDomain(websiteId) : '';
|
||||||
|
return (
|
||||||
|
<a href={`//${domain}${x}`} target="_blank" rel="noreferrer noopener">
|
||||||
|
{x}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const [referrers, pages] = useMemo(() => {
|
const [referrers, pages] = useMemo(() => {
|
||||||
if (pageviews) {
|
if (pageviews) {
|
||||||
const referrers = percentFilter(
|
const referrers = percentFilter(
|
||||||
@ -91,6 +100,7 @@ export default function RealtimeViews({ websiteId, data, websites }) {
|
|||||||
<DataTable
|
<DataTable
|
||||||
title={<FormattedMessage id="metrics.pages" defaultMessage="Pages" />}
|
title={<FormattedMessage id="metrics.pages" defaultMessage="Pages" />}
|
||||||
metric={<FormattedMessage id="metrics.views" defaultMessage="Views" />}
|
metric={<FormattedMessage id="metrics.views" defaultMessage="Views" />}
|
||||||
|
renderLabel={renderLink}
|
||||||
data={pages}
|
data={pages}
|
||||||
height={400}
|
height={400}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user