Updated Goal loading.
This commit is contained in:
@@ -24,7 +24,7 @@ export type GoalData = { num: number; total: number };
|
||||
|
||||
export function Goal({ id, name, type, parameters, websiteId, startDate, endDate }: GoalProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { data, error, isLoading } = useResultQuery<GoalData>(type, {
|
||||
const { data, error, isLoading, isFetching } = useResultQuery<GoalData>(type, {
|
||||
websiteId,
|
||||
dateRange: {
|
||||
startDate,
|
||||
@@ -35,7 +35,8 @@ export function Goal({ id, name, type, parameters, websiteId, startDate, endDate
|
||||
const isPage = parameters?.type === 'page';
|
||||
|
||||
return (
|
||||
<LoadingPanel data={data} isLoading={isLoading} error={error}>
|
||||
<LoadingPanel data={data} isLoading={isLoading} isFetching={isFetching} error={error}>
|
||||
{data && (
|
||||
<Grid gap>
|
||||
<Grid columns="1fr auto" gap>
|
||||
<Column gap>
|
||||
@@ -93,6 +94,7 @@ export function Goal({ id, name, type, parameters, websiteId, startDate, endDate
|
||||
</Text>
|
||||
</Row>
|
||||
</Grid>
|
||||
)}
|
||||
</LoadingPanel>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user