mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Updated fetch hook API.
This commit is contained in:
commit
69b317386a
21 changed files with 112 additions and 76 deletions
|
|
@ -2,6 +2,7 @@ import React, { useMemo, useRef } from 'react';
|
|||
import { format, parseISO, startOfMinute, subMinutes, isBefore } from 'date-fns';
|
||||
import PageviewsChart from './PageviewsChart';
|
||||
import { getDateArray } from 'lib/date';
|
||||
import { DEFAULT_ANIMATION_DURATION } from 'lib/constants';
|
||||
|
||||
function mapData(data) {
|
||||
let last = 0;
|
||||
|
|
@ -44,7 +45,7 @@ export default function RealtimeChart({ data, unit, ...props }) {
|
|||
prevEndDate.current = endDate;
|
||||
return 0;
|
||||
}
|
||||
return 300;
|
||||
return DEFAULT_ANIMATION_DURATION;
|
||||
}, [data]);
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue