mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Fix UI bug in OS settings modal that caused status tooltip to flicker when refetching host details (#36099)
This commit is contained in:
parent
65234043f8
commit
b7f1f479e0
3 changed files with 17 additions and 12 deletions
2
changes/25787-ui-bugfix
Normal file
2
changes/25787-ui-bugfix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
- Fixed UI bug in OS settings modal that caused status tooltip to flicker when refetching host
|
||||
details.
|
||||
|
|
@ -541,12 +541,12 @@ const DeviceUserPage = ({
|
|||
setSelectedCertificate(certificate);
|
||||
};
|
||||
|
||||
const resendProfile = (profileUUID: string): Promise<void> => {
|
||||
if (!host) {
|
||||
return new Promise(() => undefined);
|
||||
}
|
||||
return deviceUserAPI.resendProfile(deviceAuthToken, profileUUID);
|
||||
};
|
||||
const resendProfile = useCallback(
|
||||
(profileUUID: string): Promise<void> => {
|
||||
return deviceUserAPI.resendProfile(deviceAuthToken, profileUUID);
|
||||
},
|
||||
[deviceAuthToken]
|
||||
);
|
||||
|
||||
const renderDeviceUserPage = () => {
|
||||
const failingPoliciesCount = host?.issues?.failing_policies_count || 0;
|
||||
|
|
|
|||
|
|
@ -669,12 +669,15 @@ const HostDetailsPage = ({
|
|||
}
|
||||
};
|
||||
|
||||
const resendProfile = (profileUUID: string): Promise<void> => {
|
||||
if (!host) {
|
||||
return new Promise(() => undefined);
|
||||
}
|
||||
return hostAPI.resendProfile(host.id, profileUUID);
|
||||
};
|
||||
const resendProfile = useCallback(
|
||||
(profileUUID: string): Promise<void> => {
|
||||
if (!host?.id) {
|
||||
return new Promise(() => undefined);
|
||||
}
|
||||
return hostAPI.resendProfile(host.id, profileUUID);
|
||||
},
|
||||
[host?.id]
|
||||
);
|
||||
|
||||
const onChangeActivityTab = (tabIndex: number) => {
|
||||
setActiveActivityTab(tabIndex === 0 ? "past" : "upcoming");
|
||||
|
|
|
|||
Loading…
Reference in a new issue