You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- React Hook dependency warnings
- wrap `handleInputSubmit` in useCallback and define it before it is used
- also de-nest else-if
- also don't need both `?` and `| undefined`
Copy file name to clipboardExpand all lines: packages/scribe/src/plugins/PerfNodesItems/useUsfmMarkersForMenu.ts
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,11 @@ import getMarker from "shared/utils/usfm/getMarker";
7
7
// getMarkerAction() returns a function to generate a LexicalNode and insert it in the editor, this lexical node is a custom node made for the PERF editor
8
8
//NOTE: You can create your own typeahead plugin by creating your own getMarker() and getMarkerAction() functions adapted to your editor needs.
9
9
exportdefaultfunctionuseUsfmMakersForMenu({
10
-
editor,
11
10
scriptureReference,
12
11
contextMarker,
13
12
getMarkerAction,
14
13
autoNumbering,
15
14
}: {
16
-
editor: LexicalEditor;
17
15
scriptureReference: ScriptureReference;
18
16
contextMarker: string|undefined;
19
17
getMarkerAction: GetMarkerAction;
@@ -38,8 +36,8 @@ export default function useUsfmMakersForMenu({
38
36
noteText,
39
37
}: {
40
38
editor: LexicalEditor;
41
-
newVerseRChapterNum?: number|undefined;
42
-
noteText?: string|undefined;
39
+
newVerseRChapterNum?: number;
40
+
noteText?: string;
43
41
})=>{
44
42
action({
45
43
editor,
@@ -52,7 +50,7 @@ export default function useUsfmMakersForMenu({
0 commit comments