From 209a9b29a5d32fe159113395687760987c0df5fa Mon Sep 17 00:00:00 2001 From: Gabriel Hernandez Date: Fri, 2 Aug 2024 18:56:25 +0100 Subject: [PATCH] Remove vpp warning banner when it has been successfuly reuploaded (#21003) quick fix to remove the vpp warning banner when the user has successfully uploaded a new one. --- .../IntegrationsPage/cards/Vpp/VppSetupPage/VppSetupPage.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/pages/admin/IntegrationsPage/cards/Vpp/VppSetupPage/VppSetupPage.tsx b/frontend/pages/admin/IntegrationsPage/cards/Vpp/VppSetupPage/VppSetupPage.tsx index a4289664e6..84d75fd073 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/Vpp/VppSetupPage/VppSetupPage.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/Vpp/VppSetupPage/VppSetupPage.tsx @@ -4,6 +4,7 @@ import { useQuery } from "react-query"; import { AxiosError } from "axios"; import PATHS from "router/paths"; +import { AppContext } from "context/app"; import { NotificationContext } from "context/notification"; import { getErrorReason } from "interfaces/errors"; import mdmAppleAPI, { IGetVppInfoResponse } from "services/entities/mdm_apple"; @@ -121,6 +122,7 @@ interface IVppSetupPageProps { const VppSetupPage = ({ router }: IVppSetupPageProps) => { const [showDisableModal, setShowDisableModal] = useState(false); const [showRenewModal, setShowRenewModal] = useState(false); + const { setVppExpiry } = useContext(AppContext); const { data: vppData, @@ -134,6 +136,9 @@ const VppSetupPage = ({ router }: IVppSetupPageProps) => { { ...DEFAULT_USE_QUERY_OPTIONS, retry: false, + onSuccess: (data) => { + setVppExpiry(data.renew_date); + }, } );