fix(dashboard): remove loading state when we already have some data

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-20 15:01:08 +02:00
parent 49a020009f
commit 0959ede055
10 changed files with 50 additions and 12 deletions

View File

@@ -15,7 +15,11 @@ export function ReportMapChart() {
staleTime: 1000 * 60 * 1,
});
if (isLazyLoading || res.isLoading || res.isFetching) {
if (
isLazyLoading ||
res.isLoading ||
(res.isFetching && !res.data?.series.length)
) {
return <Loading />;
}