diff --git a/src/components/Reports/DonationsReport/DonationsReport.test.tsx b/src/components/Reports/DonationsReport/DonationsReport.test.tsx index 852fbae04..dd2bcccc3 100644 --- a/src/components/Reports/DonationsReport/DonationsReport.test.tsx +++ b/src/components/Reports/DonationsReport/DonationsReport.test.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { DonationTableQuery } from 'src/components/DonationTable/DonationTable.generated'; import { ThemeProvider } from '@mui/material/styles'; import { render, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; @@ -10,6 +9,7 @@ import { afterTestResizeObserver, beforeTestResizeObserver, } from '__tests__/util/windowResizeObserver'; +import { DonationTableQuery } from 'src/components/DonationTable/DonationTable.generated'; import theme from 'src/theme'; import { GetDonationsGraphQuery } from '../../Contacts/ContactDetails/ContactDonationsTab/DonationsGraph/DonationsGraph.generated'; import { DonationsReport } from './DonationsReport'; diff --git a/src/components/Settings/Organization/AccountLists/AccountLists.tsx b/src/components/Settings/Organization/AccountLists/AccountLists.tsx index 748f11057..9fb1b2d52 100644 --- a/src/components/Settings/Organization/AccountLists/AccountLists.tsx +++ b/src/components/Settings/Organization/AccountLists/AccountLists.tsx @@ -37,10 +37,7 @@ export const AccountLists: React.FC = () => { const pagination = data?.searchOrganizationsAccountLists.pagination; useEffect(() => { - if (!accountListsRef.current) { - return; - } - if (!window.visualViewport?.height) { + if (!accountListsRef.current || !window.visualViewport?.height) { return; } // 24px for the padding which the parent page has added. diff --git a/src/components/Settings/Organization/Contacts/Contacts.tsx b/src/components/Settings/Organization/Contacts/Contacts.tsx index 82266dbc8..a495b4b64 100644 --- a/src/components/Settings/Organization/Contacts/Contacts.tsx +++ b/src/components/Settings/Organization/Contacts/Contacts.tsx @@ -40,9 +40,6 @@ export const Contacts: React.FC = () => { if (!contactsRef.current || !window.visualViewport?.height) { return; } - if (!window.visualViewport?.height) { - return; - } // 24px for the padding which the parent page has added. setInfiniteListHeight( window.visualViewport.height -