mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-19 15:53:39 +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(() => {
|
||||
if (pageviews) {
|
||||
const referrers = percentFilter(
|
||||
@ -91,6 +100,7 @@ export default function RealtimeViews({ websiteId, data, websites }) {
|
||||
<DataTable
|
||||
title={<FormattedMessage id="metrics.pages" defaultMessage="Pages" />}
|
||||
metric={<FormattedMessage id="metrics.views" defaultMessage="Views" />}
|
||||
renderLabel={renderLink}
|
||||
data={pages}
|
||||
height={400}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user