From c7aef6e4671836b5a4e58dc27486b7b17227feef Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 30 Jan 2024 14:28:29 -0800 Subject: [PATCH] fix: minor TypeScript error - not sure how it got onto master --- src/taxonomy/TaxonomyListPage.jsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/taxonomy/TaxonomyListPage.jsx b/src/taxonomy/TaxonomyListPage.jsx index 3a42a580be..1429d88166 100644 --- a/src/taxonomy/TaxonomyListPage.jsx +++ b/src/taxonomy/TaxonomyListPage.jsx @@ -154,13 +154,9 @@ const TaxonomyListPage = () => { isSuccess: isOrganizationListLoaded, } = useOrganizationListData(); - const useTaxonomyListData = () => { - const taxonomyListData = useTaxonomyListDataResponse(selectedOrgFilter); - const isLoaded = useIsTaxonomyListDataLoaded(selectedOrgFilter); - return { taxonomyListData, isLoaded }; - }; - const { taxonomyListData, isLoaded } = useTaxonomyListData(); - const canAddTaxonomy = isLoaded ? taxonomyListData.canAddTaxonomy : false; + const taxonomyListData = useTaxonomyListDataResponse(selectedOrgFilter); + const isLoaded = useIsTaxonomyListDataLoaded(selectedOrgFilter); + const canAddTaxonomy = taxonomyListData?.canAddTaxonomy ?? false; const getOrgSelect = () => ( // Initialize organization select component