mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
remove urlpath conditional
This commit is contained in:
parent
05ece6a4d0
commit
db845d6c04
1 changed files with 5 additions and 7 deletions
|
|
@ -53,14 +53,12 @@ export default function RealtimeUrls({ websiteDomain, data = {} }) {
|
||||||
const pages = percentFilter(
|
const pages = percentFilter(
|
||||||
pageviews
|
pageviews
|
||||||
.reduce((arr, { urlPath }) => {
|
.reduce((arr, { urlPath }) => {
|
||||||
if (urlPath?.startsWith('/')) {
|
const row = arr.find(({ x }) => x === urlPath);
|
||||||
const row = arr.find(({ x }) => x === urlPath);
|
|
||||||
|
|
||||||
if (!row) {
|
if (!row) {
|
||||||
arr.push({ x: urlPath, y: 1 });
|
arr.push({ x: urlPath, y: 1 });
|
||||||
} else {
|
} else {
|
||||||
row.y += 1;
|
row.y += 1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}, [])
|
}, [])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue