Skip to content

Commit

Permalink
Remove isFetching (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph authored and tiero committed Nov 1, 2023
1 parent 086d6ad commit 19db6b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/modules/service-detail/components/ServiceDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -39,8 +39,7 @@ const ServiceDetail = () => {
navigate("/");
};

if (isFetching || isLoading || !service || Object.keys(service ?? {}).length === 0)
return <ServiceLoading />;
if (isLoading || !service || Object.keys(service ?? {}).length === 0) return <ServiceLoading />;

const status = getServiceStatus(service);

Expand Down

0 comments on commit 19db6b4

Please sign in to comment.