From 45ed12ce22e87aeedfe61eb51ceb9fd97a2dc3b1 Mon Sep 17 00:00:00 2001 From: Alisher Musurmonov Date: Tue, 17 Oct 2023 18:38:56 +0500 Subject: [PATCH] refactor: update boolean check for accordion visibility --- src/Organizations/OrganizationDetails/OrganizationDetails.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Organizations/OrganizationDetails/OrganizationDetails.js b/src/Organizations/OrganizationDetails/OrganizationDetails.js index 77589561..7a12c905 100644 --- a/src/Organizations/OrganizationDetails/OrganizationDetails.js +++ b/src/Organizations/OrganizationDetails/OrganizationDetails.js @@ -110,6 +110,7 @@ const OrganizationDetails = ({ const history = useHistory(); const accordionStatusRef = useRef(); const isDetailsPaneInFocus = location.state?.isDetailsPaneInFocus; + const isDonorVisible = organization?.isVendor && organization?.isDonor; const { restrictions, isLoading: isRestrictionsLoading } = useAcqRestrictions( organization.id, organization.acqUnitIds, ); @@ -338,7 +339,7 @@ const OrganizationDetails = ({ { - Boolean(organization.isVendor && organization.isDonor) && ( + isDonorVisible && (