Skip to content

Commit

Permalink
fix: remove unnecessary useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Oct 3, 2024
1 parent 20165ec commit e56d462
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ function ReimbursementAccountPage({route, policy}: ReimbursementAccountPageProps
const {translate} = useLocalize();
const {isOffline} = useNetwork();
const requestorStepRef = useRef(null);
const prevIsReimbursementAccountLoading = usePrevious(reimbursementAccount?.isLoading);
const prevReimbursementAccount = usePrevious(reimbursementAccount);
const prevIsOffline = usePrevious(isOffline);

Expand Down Expand Up @@ -222,13 +221,6 @@ function ReimbursementAccountPage({route, policy}: ReimbursementAccountPageProps
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, []); // The empty dependency array ensures this runs only once after the component mounts.

useEffect(() => {
if (typeof reimbursementAccount?.isLoading !== 'boolean' || reimbursementAccount.isLoading === prevIsReimbursementAccountLoading) {
return;
}
setHasACHDataBeenLoaded(true);
}, [prevIsReimbursementAccountLoading, reimbursementAccount?.isLoading]);

useEffect(
() => {
// Check for network change from offline to online
Expand Down

0 comments on commit e56d462

Please sign in to comment.