Merge pull request #745 from bluewave-labs/fix/certificate-check

Add check for monitor type to abort certificate check if not http type, resolves #720
This commit is contained in:
Alexander Holliday
2024-08-28 18:52:54 -07:00
committed by GitHub

View File

@@ -142,6 +142,9 @@ const DetailsPage = ({ isAdmin }) => {
useEffect(() => {
const fetchCertificate = async () => {
if (monitor?.type !== "http") {
return;
}
try {
const res = await networkService.getCertificateExpiry(
authToken,
@@ -153,7 +156,7 @@ const DetailsPage = ({ isAdmin }) => {
}
};
fetchCertificate();
}, [authToken, monitorId]);
}, [authToken, monitorId, monitor]);
const theme = useTheme();
let loading = Object.keys(monitor).length === 0;