mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Updated fetch hook API.
This commit is contained in:
commit
69b317386a
21 changed files with 112 additions and 76 deletions
|
|
@ -40,14 +40,18 @@ export default function MetricsTable({
|
|||
const { data, loading, error } = useFetch(
|
||||
`/api/website/${websiteId}/metrics`,
|
||||
{
|
||||
type,
|
||||
start_at: +startDate,
|
||||
end_at: +endDate,
|
||||
domain: websiteDomain,
|
||||
url,
|
||||
token,
|
||||
params: {
|
||||
type,
|
||||
start_at: +startDate,
|
||||
end_at: +endDate,
|
||||
domain: websiteDomain,
|
||||
url,
|
||||
token,
|
||||
},
|
||||
onDataLoad,
|
||||
delay: 300,
|
||||
},
|
||||
{ onDataLoad, delay: 300, update: [modified] },
|
||||
[modified],
|
||||
);
|
||||
const [format, setFormat] = useState(true);
|
||||
const formatFunc = format ? formatLongNumber : formatNumber;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue