Skip to content

Commit

Permalink
Combine return blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed May 10, 2024
1 parent e2a053f commit b9d2fbf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions src/components/Settings/Organization/Contacts/Contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand Down

0 comments on commit b9d2fbf

Please sign in to comment.