mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
Add links to referrer urls.
This commit is contained in:
parent
7c0e0dd8c4
commit
e7f83c084e
4 changed files with 25 additions and 3 deletions
|
|
@ -13,6 +13,16 @@ export default function Referrers({
|
|||
}) {
|
||||
const [filter, setFilter] = useState('Combined');
|
||||
|
||||
const renderLink = url => {
|
||||
return url.startsWith('http') ? (
|
||||
<a href={url} target="_blank" rel="noreferrer">
|
||||
{url}
|
||||
</a>
|
||||
) : (
|
||||
url
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<MetricsTable
|
||||
title="Referrers"
|
||||
|
|
@ -30,6 +40,7 @@ export default function Referrers({
|
|||
raw: filter === 'Raw',
|
||||
}}
|
||||
onExpand={onExpand}
|
||||
labelRenderer={renderLink}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue