Skip to content

Commit 19a3756

Browse files
committed
lint
1 parent 6d6425a commit 19a3756

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/components/LHNOptionsList/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import type {
1313
ReportAction,
1414
ReportActions,
1515
ReportAttributesDerivedValue,
16-
ReportMetadata,
1716
ReportNameValuePairs,
1817
Transaction,
1918
TransactionViolation,

src/components/ReportWelcomeText.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ type ReportWelcomeTextProps = {
4545
function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) {
4646
const {translate} = useLocalize();
4747
const styles = useThemeStyles();
48-
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
48+
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {canBeMissing: false});
4949
const isPolicyExpenseChat = isPolicyExpenseChatReportUtils(report);
5050
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
51-
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID || undefined}`);
52-
const [reportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${report?.reportID || undefined}`);
51+
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID || undefined}`, {canBeMissing: false});
52+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
53+
const [reportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${report?.reportID || undefined}`, {canBeMissing: false});
5354
const isArchivedRoom = isArchivedNonExpenseReport(report, reportNameValuePairs);
5455
const isChatRoom = isChatRoomReportUtils(report);
5556
const isSelfDM = isSelfDMReportUtils(report);

src/libs/SidebarUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {ValueOf} from 'type-fest';
55
import type {PartialPolicyForSidebar} from '@hooks/useSidebarOrderedReportIDs';
66
import CONST from '@src/CONST';
77
import ONYXKEYS from '@src/ONYXKEYS';
8-
import type {PersonalDetails, PersonalDetailsList, ReportActions, ReportAttributesDerivedValue, ReportMetadata, ReportNameValuePairs, TransactionViolation} from '@src/types/onyx';
8+
import type {PersonalDetails, PersonalDetailsList, ReportActions, ReportAttributesDerivedValue, ReportNameValuePairs, TransactionViolation} from '@src/types/onyx';
99
import type Beta from '@src/types/onyx/Beta';
1010
import type Policy from '@src/types/onyx/Policy';
1111
import type PriorityMode from '@src/types/onyx/PriorityMode';

src/pages/ReportParticipantsPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) {
6969
const {shouldUseNarrowLayout, isSmallScreenWidth} = useResponsiveLayout();
7070
const selectionListRef = useRef<SelectionListHandle>(null);
7171
const textInputRef = useRef<TextInput>(null);
72-
const [userSearchPhrase] = useOnyx(ONYXKEYS.ROOM_MEMBERS_USER_SEARCH_PHRASE);
73-
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID}`);
74-
const [reportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${report?.reportID}`);
75-
const [reportAttributes] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {selector: (attributes) => attributes?.reports});
72+
const [userSearchPhrase] = useOnyx(ONYXKEYS.ROOM_MEMBERS_USER_SEARCH_PHRASE, {canBeMissing: true});
73+
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID}`, {canBeMissing: false});
74+
const [reportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${report?.reportID}`, {canBeMissing: false});
75+
const [reportAttributes] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {selector: (attributes) => attributes?.reports, canBeMissing: false});
7676
const {selectionMode} = useMobileSelectionMode();
77-
const [session] = useOnyx(ONYXKEYS.SESSION);
78-
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
77+
const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
78+
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {canBeMissing: false});
7979
const currentUserAccountID = Number(session?.accountID);
8080
const isCurrentUserAdmin = isGroupChatAdmin(report, currentUserAccountID);
8181
const isGroupChat = useMemo(() => isGroupChatUtils(report), [report]);

0 commit comments

Comments
 (0)