Skip to content

Commit

Permalink
refactor: update boolean check for accordion visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Oct 17, 2023
1 parent 9f6f390 commit ee981cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Organizations/OrganizationDetails/OrganizationDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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,
);
Expand Down Expand Up @@ -333,7 +334,7 @@ const OrganizationDetails = ({
</Accordion>

{
Boolean(organization.isVendor && organization.isDonor) && (
isDonorVisible && (
<Accordion
id={donorContacts}
label={ORGANIZATION_SECTION_LABELS[donorContacts]}
Expand Down

0 comments on commit ee981cf

Please sign in to comment.