Skip to content

Commit 731dce4

Browse files
committed
Lint and TS fixes
1 parent 301b499 commit 731dce4

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/hooks/useSidebarOrderedReports.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function SidebarOrderedReportsContextProvider({
5959
const [transactions, {sourceValue: transactionsUpdates}] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION, {canBeMissing: true});
6060
const [transactionViolations, {sourceValue: transactionViolationsUpdates}] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS, {canBeMissing: true});
6161
const [reportNameValuePairs, {sourceValue: reportNameValuePairsUpdates}] = useOnyx(ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS, {canBeMissing: true});
62-
const [reportsDrafts = {}, {sourceValue: reportsDraftsUpdates}] = useOnyx(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, {canBeMissing: true});
62+
const [, {sourceValue: reportsDraftsUpdates}] = useOnyx(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, {canBeMissing: true});
6363
const [betas] = useOnyx(ONYXKEYS.BETAS, {canBeMissing: true});
6464
const [reportAttributes] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {selector: (value) => value?.reports, canBeMissing: true});
6565
const [currentReportsToDisplay, setCurrentReportsToDisplay] = useState<ReportsToDisplayInLHN>({});

src/pages/home/report/ReportActionCompose/SilentCommentUpdater/index.android.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {useEffect} from 'react';
22
import {useOnyx} from 'react-native-onyx';
33
import ONYXKEYS from '@src/ONYXKEYS';
4-
import type {SilentCommentUpdaterProps} from './types';
4+
import type SilentCommentUpdaterProps from './types';
55

66
/**
77
* Adding .android component to disable updating comment when prev comment is different

src/pages/home/report/ReportActionCompose/SilentCommentUpdater/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {useOnyx} from 'react-native-onyx';
33
import useLocalize from '@hooks/useLocalize';
44
import usePrevious from '@hooks/usePrevious';
55
import ONYXKEYS from '@src/ONYXKEYS';
6-
import type {SilentCommentUpdaterProps} from './types';
6+
import type SilentCommentUpdaterProps from './types';
77

88
/**
99
* This component doesn't render anything. It runs a side effect to update the comment of a report under certain conditions.
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import type {OnyxEntry} from 'react-native-onyx';
2-
3-
type SilentCommentUpdaterOnyxProps = {
4-
/** The comment of the report */
5-
comment: OnyxEntry<string>;
6-
};
7-
8-
type SilentCommentUpdaterProps = SilentCommentUpdaterOnyxProps & {
1+
type SilentCommentUpdaterProps = {
92
/** Updates the comment */
103
updateComment: (comment: string) => void;
114

@@ -22,4 +15,4 @@ type SilentCommentUpdaterProps = SilentCommentUpdaterOnyxProps & {
2215
isCommentPendingSaved: React.RefObject<boolean>;
2316
};
2417

25-
export type {SilentCommentUpdaterProps, SilentCommentUpdaterOnyxProps};
18+
export default SilentCommentUpdaterProps;

0 commit comments

Comments
 (0)