mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
fix typescript type (#11887)
This commit is contained in:
parent
62e8e9e36a
commit
04ef6f13f8
3 changed files with 6 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ const DEFAULT_HOST_MOCK: IHost = {
|
|||
last_enrolled_at: "2022-01-02T12:00:00Z",
|
||||
seen_time: "2022-04-06T02:11:41Z",
|
||||
refetch_requested: false,
|
||||
refetch_critical_queries_until: null,
|
||||
hostname: "9b20fc72a247",
|
||||
display_name: "9b20fc72a247",
|
||||
display_text: "mock host 1",
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ export interface IHost {
|
|||
last_enrolled_at: string;
|
||||
seen_time: string;
|
||||
refetch_requested: boolean;
|
||||
refetch_critical_queries_until: string;
|
||||
refetch_critical_queries_until: string | null;
|
||||
hostname: string;
|
||||
uuid: string;
|
||||
platform: string;
|
||||
|
|
|
|||
|
|
@ -121,6 +121,10 @@ const DeviceUserPage = ({
|
|||
refetch_requested,
|
||||
refetch_critical_queries_until,
|
||||
}: IHost) => {
|
||||
if (!refetch_critical_queries_until) {
|
||||
return refetch_requested;
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
const refetchUntil = new Date(refetch_critical_queries_until);
|
||||
const isRefetchingCriticalQueries =
|
||||
|
|
|
|||
Loading…
Reference in a new issue