mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
fix visitDuration calculation and conditionally show bounce/visitDuration on session columns
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
This commit is contained in:
parent
6c832bd0db
commit
f06ef6fbc9
4 changed files with 28 additions and 106 deletions
|
|
@ -59,7 +59,7 @@ export function Breakdown({ websiteId, selectedFields = [], startDate, endDate }
|
|||
</DataColumn>
|
||||
<DataColumn id="visitDuration" label={formatMessage(labels.visitDuration)} align="end">
|
||||
{row => {
|
||||
const n = (row?.['totaltime'] / row?.['visits']) * 100;
|
||||
const n = row?.['totaltime'] / row?.['visits'];
|
||||
return `${+n < 0 ? '-' : ''}${formatShortTime(Math.abs(~~n), ['m', 's'], ' ')}`;
|
||||
}}
|
||||
</DataColumn>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue