mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-31 09:45:45 +02:00
fix site status stuck loading sometimes
This commit is contained in:
@@ -114,7 +114,7 @@ export default function SitesTable({
|
|||||||
const [isRefreshing, startTransition] = useTransition();
|
const [isRefreshing, startTransition] = useTransition();
|
||||||
const [isNavigatingToAddPage, startNavigation] = useTransition();
|
const [isNavigatingToAddPage, startNavigation] = useTransition();
|
||||||
|
|
||||||
const siteIds = sites.map((s) => s.id);
|
const siteIds = useMemo(() => sites.map((s) => s.id), [sites]);
|
||||||
|
|
||||||
const statusHistoryQuery = useQuery({
|
const statusHistoryQuery = useQuery({
|
||||||
...orgQueries.batchedSiteStatusHistory({
|
...orgQueries.batchedSiteStatusHistory({
|
||||||
@@ -638,7 +638,14 @@ export default function SitesTable({
|
|||||||
];
|
];
|
||||||
|
|
||||||
return cols;
|
return cols;
|
||||||
}, [orgId, t, searchParams, latestNewtVersion]);
|
}, [
|
||||||
|
orgId,
|
||||||
|
t,
|
||||||
|
searchParams,
|
||||||
|
latestNewtVersion,
|
||||||
|
statusHistoryQuery.data,
|
||||||
|
statusHistoryQuery.isLoading
|
||||||
|
]);
|
||||||
|
|
||||||
function toggleSort(column: string) {
|
function toggleSort(column: string) {
|
||||||
const newSearch = getNextSortOrder(column, searchParams);
|
const newSearch = getNextSortOrder(column, searchParams);
|
||||||
|
|||||||
Reference in New Issue
Block a user