mirror of
https://github.com/umami-software/umami.git
synced 2026-02-24 22:45:36 +01:00
Unified loading states.
This commit is contained in:
parent
7b5591a3ce
commit
da8c7e99c5
52 changed files with 506 additions and 364 deletions
|
|
@ -23,10 +23,9 @@ export function UTM({ websiteId, startDate, endDate }: UTMProps) {
|
|||
endDate,
|
||||
},
|
||||
});
|
||||
const isEmpty = !Object.keys(data || {})?.length;
|
||||
|
||||
return (
|
||||
<LoadingPanel isEmpty={isEmpty} isLoading={isLoading} error={error}>
|
||||
<LoadingPanel data={data} isLoading={isLoading} error={error}>
|
||||
<Column gap>
|
||||
{UTM_PARAMS.map(param => {
|
||||
const items = toArray(data?.[param]);
|
||||
|
|
@ -61,7 +60,7 @@ export function UTM({ websiteId, startDate, endDate }: UTMProps) {
|
|||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
<PieChart type="doughnut" data={chartData} />
|
||||
<PieChart type="doughnut" chartData={chartData} />
|
||||
</Column>
|
||||
</Grid>
|
||||
</Panel>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue