From f87fed9e75a7e56dfe832fd06ead0fc1bfa31832 Mon Sep 17 00:00:00 2001 From: Janaka-Steph Date: Wed, 1 Nov 2023 16:56:17 +0100 Subject: [PATCH] Remove isFetching (#460) --- src/modules/service-detail/components/ServiceDetail.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/service-detail/components/ServiceDetail.tsx b/src/modules/service-detail/components/ServiceDetail.tsx index e5e29647..010bac5b 100644 --- a/src/modules/service-detail/components/ServiceDetail.tsx +++ b/src/modules/service-detail/components/ServiceDetail.tsx @@ -26,7 +26,7 @@ const ServiceDetail = () => { serviceType: Service["serviceType"]; }>(); const navigate = useNavigate(); - const { data: service, isLoading, isFetching, refetch } = useGetService(serviceId!, serviceType!); + const { data: service, isLoading, refetch } = useGetService(serviceId!, serviceType!); const { data: interfaces } = useInterfaces(); @@ -39,8 +39,7 @@ const ServiceDetail = () => { navigate("/"); }; - if (isFetching || isLoading || !service || Object.keys(service ?? {}).length === 0) - return ; + if (isLoading || !service || Object.keys(service ?? {}).length === 0) return ; const status = getServiceStatus(service);