Skip to content

Commit e9c0abe

Browse files
fix: remove duplicate useOnyx subscription and redundant hook call in LHN
1 parent 48916e2 commit e9c0abe

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/components/LHNOptionsList/OptionRowLHNData.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ function OptionRowLHNData({
118118
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
119119
const {login} = useCurrentUserPersonalDetails();
120120
const [policyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${fullReport?.policyID}`);
121-
const [fullReportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${fullReport?.reportID}`);
122121

123122
const card = useGetExpensifyCardFromReportAction({reportAction: lastAction, policyID: fullReport?.policyID});
124123

@@ -157,7 +156,7 @@ function OptionRowLHNData({
157156
reportAttributesDerived,
158157
policyTags,
159158
currentUserLogin: login ?? '',
160-
reportActions: fullReportActions,
159+
reportActions,
161160
});
162161

163162
// For single-sender IOUs, trim to the sender's avatar to match the header.

src/pages/inbox/sidebar/SidebarLinks.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {EdgeInsets} from 'react-native-safe-area-context';
55
import type {ValueOf} from 'type-fest';
66
import LHNOptionsList from '@components/LHNOptionsList/LHNOptionsList';
77
import OptionsListSkeletonView from '@components/OptionsListSkeletonView';
8-
import useConfirmReadyToOpenApp from '@hooks/useConfirmReadyToOpenApp';
98
import useOnyx from '@hooks/useOnyx';
109
import useResponsiveLayout from '@hooks/useResponsiveLayout';
1110
import useStyleUtils from '@hooks/useStyleUtils';
@@ -41,8 +40,6 @@ function SidebarLinks({insets, optionListItems, priorityMode = CONST.PRIORITY_MO
4140
const {shouldUseNarrowLayout} = useResponsiveLayout();
4241
const [isLoadingReportData = true] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA);
4342

44-
useConfirmReadyToOpenApp();
45-
4643
useEffect(() => {
4744
ReportActionContextMenu.hideContextMenu(false);
4845
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)