Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Oct 21, 2024
1 parent 14b7e7c commit 021c725
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/pages/PrivateNotes/PrivateNotesEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import {Str} from 'expensify-common';
import lodashDebounce from 'lodash/debounce';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import {Keyboard} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
Expand All @@ -31,25 +30,20 @@ import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import INPUT_IDS from '@src/types/form/PrivateNotesForm';
import type {PersonalDetailsList, Report} from '@src/types/onyx';
import type {Report} from '@src/types/onyx';
import type {Note} from '@src/types/onyx/Report';

type PrivateNotesEditPageOnyxProps = {
/** All of the personal details for everyone */
personalDetailsList: OnyxEntry<PersonalDetailsList>;
};

type PrivateNotesEditPageProps = WithReportAndPrivateNotesOrNotFoundProps &
PrivateNotesEditPageOnyxProps &
StackScreenProps<PrivateNotesNavigatorParamList, typeof SCREENS.PRIVATE_NOTES.EDIT> & {
/** The report currently being looked at */
report: Report;
};

function PrivateNotesEditPage({route, personalDetailsList, report, accountID}: PrivateNotesEditPageProps) {
function PrivateNotesEditPage({route, report, accountID}: PrivateNotesEditPageProps) {
const backTo = route.params.backTo;
const styles = useThemeStyles();
const {translate} = useLocalize();
const [personalDetailsList] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);

// We need to edit the note in markdown format, but display it in HTML format
const [privateNote, setPrivateNote] = useState(
Expand Down Expand Up @@ -178,10 +172,4 @@ function PrivateNotesEditPage({route, personalDetailsList, report, accountID}: P

PrivateNotesEditPage.displayName = 'PrivateNotesEditPage';

export default withReportAndPrivateNotesOrNotFound('privateNotes.title')(
withOnyx<PrivateNotesEditPageProps, PrivateNotesEditPageOnyxProps>({
personalDetailsList: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
})(PrivateNotesEditPage),
);
export default withReportAndPrivateNotesOrNotFound('privateNotes.title')(PrivateNotesEditPage);

0 comments on commit 021c725

Please sign in to comment.