mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 02:06:19 +01:00
Fix realtime countries / visitors
This commit is contained in:
parent
fa3659fcf6
commit
cce966c48c
@ -63,7 +63,7 @@ export default function RealtimeDashboard({ websiteId }) {
|
||||
currentData.countries = percentFilter(
|
||||
currentData.sessions
|
||||
.reduce((arr, data) => {
|
||||
if (!arr.find(({ sessionId }) => sessionId === data.sessionId)) {
|
||||
if (!arr.find(({ id }) => id === data.id)) {
|
||||
return arr.concat(data);
|
||||
}
|
||||
return arr;
|
||||
@ -84,7 +84,7 @@ export default function RealtimeDashboard({ websiteId }) {
|
||||
);
|
||||
|
||||
currentData.visitors = currentData.sessions.reduce((arr, val) => {
|
||||
if (!arr.find(({ sessionId }) => sessionId === val.sessionId)) {
|
||||
if (!arr.find(({ id }) => id === val.id)) {
|
||||
return arr.concat(val);
|
||||
}
|
||||
return arr;
|
||||
|
@ -25,7 +25,7 @@ async function clickhouseQuery(websiteId: string, startAt: Date) {
|
||||
|
||||
return rawQuery(
|
||||
`select distinct
|
||||
session_id as sessionId,
|
||||
session_id as id,
|
||||
website_id as websiteId,
|
||||
created_at as createdAt,
|
||||
toUnixTimestamp(created_at) as timestamp,
|
||||
|
Loading…
Reference in New Issue
Block a user