mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Fix unreleased bug in dashboard page UI that caused re-render loop (#21616)
This commit is contained in:
parent
9888fae830
commit
edcd2350a5
1 changed files with 9 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ import React, {
|
|||
useEffect,
|
||||
useRef,
|
||||
useCallback,
|
||||
useMemo,
|
||||
} from "react";
|
||||
import { InjectedRouter } from "react-router";
|
||||
import { useQuery } from "react-query";
|
||||
|
|
@ -652,14 +653,19 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
|
|||
),
|
||||
});
|
||||
|
||||
const MunkiCard = useInfoCard({
|
||||
title: "Munki",
|
||||
titleDetail: (
|
||||
const munkiTitleDetail = useMemo(
|
||||
() => (
|
||||
<LastUpdatedText
|
||||
lastUpdatedAt={munkiCountsUpdatedAt}
|
||||
whatToRetrieve="Munki"
|
||||
/>
|
||||
),
|
||||
[munkiCountsUpdatedAt]
|
||||
);
|
||||
|
||||
const MunkiCard = useInfoCard({
|
||||
title: "Munki",
|
||||
titleDetail: munkiTitleDetail,
|
||||
showTitle: !isMacAdminsFetching,
|
||||
description: (
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue