Skip to content

Commit

Permalink
Prevent unnecessary unmounting
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Mar 15, 2024
1 parent 9060173 commit 981fd91
Showing 1 changed file with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,18 @@ export const ContactDonationsTab: React.FC<ContactDonationsProp> = ({
</DonationsTabList>
</DonationsTabContainer>
<StyledTabPanel value={DonationTabKey.Donations}>
{loading ? (
<>
<ContactDonationsLoadingPlaceHolder />
<ContactDonationsLoadingPlaceHolder />
<ContactDonationsLoadingPlaceHolder />
</>
) : (
<DonationTable
accountListId={accountListId}
filter={{ donorAccountIds }}
emptyPlaceholder={
<EmptyDonationsTable
title={t('No donations received for {{name}}', {
name: data?.contact.name,
})}
/>
}
visibleColumnsStorageKey="contact-donations"
/>
)}
<DonationTable
accountListId={accountListId}
filter={{ donorAccountIds }}
emptyPlaceholder={
<EmptyDonationsTable
title={t('No donations received for {{name}}', {
name: data?.contact.name,
})}
/>
}
visibleColumnsStorageKey="contact-donations"
/>
</StyledTabPanel>
<StyledTabPanel value={DonationTabKey.PartnershipInfo}>
{loading ? (
Expand Down

0 comments on commit 981fd91

Please sign in to comment.