From 486b9a399b25e1b9fe3afa06ad01b9a412f7a8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Wed, 20 Sep 2023 08:54:46 +0200 Subject: [PATCH] fix: update cert effect on cert page (#16) --- src/hooks/useSubnetGetCertificateById.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useSubnetGetCertificateById.tsx b/src/hooks/useSubnetGetCertificateById.tsx index c8e9b2c..d1dbdd3 100644 --- a/src/hooks/useSubnetGetCertificateById.tsx +++ b/src/hooks/useSubnetGetCertificateById.tsx @@ -57,12 +57,13 @@ export default function useSubnetGetCertificateById({ ...e, `Could not find a certificate with the provided id (${certificateId})`, ]) + setCertificate(undefined) } else { setCertificate(data?.certificate) } } }, - [data?.certificate] + [data?.certificate, selectedSubnet] ) return { certificate, error, loading }