diff --git a/changes/22322-fix-issue-man-enrollment-device b/changes/22322-fix-issue-man-enrollment-device new file mode 100644 index 0000000000..c6caafb1b3 --- /dev/null +++ b/changes/22322-fix-issue-man-enrollment-device @@ -0,0 +1,2 @@ +- fix issue when trying to download the manual enrollment profile when device token is expired. We + now show an error for this case. diff --git a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx index e75d125a91..53db103db7 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx @@ -23,6 +23,8 @@ import Spinner from "components/Spinner"; import Button from "components/buttons/Button"; import TabsWrapper from "components/TabsWrapper"; import Icon from "components/Icon/Icon"; +import FlashMessage from "components/FlashMessage"; + import { normalizeEmptyValues } from "utilities/helpers"; import PATHS from "router/paths"; import { @@ -87,7 +89,9 @@ const DeviceUserPage = ({ }: IDeviceUserPageProps): JSX.Element => { const deviceAuthToken = device_auth_token; - const { renderFlash } = useContext(NotificationContext); + const { renderFlash, notification, hideFlash } = useContext( + NotificationContext + ); const [isPremiumTier, setIsPremiumTier] = useState(false); const [showInfoModal, setShowInfoModal] = useState(false); @@ -477,6 +481,11 @@ const DeviceUserPage = ({ return (