forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Expensify#29315 from JKobrynski/migrateUseReportSc…
…rollManagerToTypeScript [No QA] [TS Migration] Migrate useReportScrollManager and ReportScreenContext to TypeScript
- Loading branch information
Showing
6 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
13 changes: 6 additions & 7 deletions
13
...ks/useReportScrollManager/index.native.js → ...ks/useReportScrollManager/index.native.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
src/hooks/useReportScrollManager/index.js → src/hooks/useReportScrollManager/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {ActionListContextType} from '../../pages/home/ReportScreenContext'; | ||
|
||
type ReportScrollManagerData = { | ||
ref: ActionListContextType; | ||
scrollToIndex: (index: number, isEditing?: boolean) => void; | ||
scrollToBottom: () => void; | ||
}; | ||
|
||
export default ReportScrollManagerData; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {RefObject, createContext} from 'react'; | ||
import {FlatList, GestureResponderEvent} from 'react-native'; | ||
|
||
type ReactionListRef = { | ||
showReactionList: (event: GestureResponderEvent | undefined, reactionListAnchor: Element, emojiName: string, reportActionID: string) => void; | ||
hideReactionList: () => void; | ||
isActiveReportAction: (actionID: number | string) => boolean; | ||
}; | ||
|
||
type ActionListContextType = RefObject<FlatList<unknown>> | null; | ||
type ReactionListContextType = RefObject<ReactionListRef> | null; | ||
|
||
const ActionListContext = createContext<ActionListContextType>(null); | ||
const ReactionListContext = createContext<ReactionListContextType>(null); | ||
|
||
export {ActionListContext, ReactionListContext}; | ||
export type {ReactionListRef, ActionListContextType, ReactionListContextType}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters