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.
This commit is contained in:
Gabriel Hernandez 2024-08-02 18:56:25 +01:00 committed by GitHub
parent b846f90e54
commit 209a9b29a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
},
}
);