Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Mike Cao 2023-04-21 14:39:15 -07:00
commit 6c09dd1e23
3 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ export 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 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;

View File

@ -14,7 +14,7 @@ export function UsersTable({ data = [], onDelete }) {
const { dateLocale } = useLocale();
const columns = [
{ name: 'username', label: formatMessage(labels.username), style: { flex: 1.5 } },
{ name: 'username', label: formatMessage(labels.username) },
{ name: 'role', label: formatMessage(labels.role) },
{ name: 'created', label: formatMessage(labels.created) },
{ name: 'action', label: ' ' },

View File

@ -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,