Certificate FleetCTL bug: Do not render if 500 error (#4407)

This commit is contained in:
RachelElysia
2022-03-01 17:19:45 -05:00
committed by GitHub
parent 140e60b5e9
commit c895bbb9eb
@@ -62,7 +62,7 @@ const PlatformWrapper = ({
selectedTeam,
onCancel,
}: IPlatformWrapperProp): JSX.Element => {
const { config } = useContext(AppContext);
const { config, isPreviewMode } = useContext(AppContext);
const [copyMessage, setCopyMessage] = useState<string>("");
const dispatch = useDispatch();
@@ -75,6 +75,7 @@ const PlatformWrapper = ({
["certificate"],
() => configAPI.loadCertificate(),
{
enabled: !isPreviewMode,
refetchOnWindowFocus: false,
}
);