Skip to content

Commit c692022

Browse files
fix: remove redundant useMemo in useRestartOnOdometerImagesFailure
1 parent 338c8a5 commit c692022

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • src/hooks/useRestartOnOdometerImagesFailure

src/hooks/useRestartOnOdometerImagesFailure/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {useEffect, useMemo, useRef, useState} from 'react';
1+
import {useEffect, useRef, useState} from 'react';
22
import type {OnyxEntry} from 'react-native-onyx';
33
import useOnyx from '@hooks/useOnyx';
44
import {checkIfLocalFileIsAccessible} from '@libs/actions/IOU/Receipt';
@@ -31,13 +31,13 @@ const useRestartOnOdometerImagesFailure = (
3131
const hasCheckedRef = useRef(false);
3232
const [asyncVerificationPassed, setAsyncVerificationPassed] = useState(false);
3333

34-
const hasBlobUrls = useMemo(() => {
34+
const hasBlobUrls = (() => {
3535
if (!transaction) {
3636
return false;
3737
}
3838
const paths = [getOdometerImageUri(transaction.comment?.odometerStartImage), getOdometerImageUri(transaction.comment?.odometerEndImage), transaction.receipt?.source?.toString()];
3939
return paths.some((path) => !!path && path.startsWith('blob:'));
40-
}, [transaction]);
40+
})();
4141

4242
useEffect(() => {
4343
if (!transaction || isLoadingOnyxValue(draftTransactionsMetadata)) {

0 commit comments

Comments
 (0)