Revize bc25708c
Přidáno uživatelem Fantič před více než 1 rok
src/pages/NotesViewPage.tsx | ||
---|---|---|
75 | 75 |
}, [generalCommentsCheck, myCommentsCheck]) |
76 | 76 | |
77 | 77 | |
78 |
const getNotes = () => { |
|
78 |
const getNotes = useCallback(() => {
|
|
79 | 79 |
dispatch(getAllNotes({ |
80 | 80 |
myComments: myCommentsCheck, |
81 | 81 |
generalComments: generalCommentsCheck, |
82 | 82 |
sortOptions: sortSettings |
83 | 83 |
})); |
84 |
} |
|
84 |
}, [myCommentsCheck, generalCommentsCheck, sortSettings]);
|
|
85 | 85 | |
86 |
const handleCreateComment = (newComment: string, replyingTo: { messageId: string; userName: string } | null) => { |
|
87 | 86 | |
87 |
const handleCreateComment = useCallback((newComment: string, replyingTo: { messageId: string; userName: string } | null) => { |
|
88 | 88 |
console.log(newComment, replyingTo) |
89 | 89 | |
90 | 90 |
if (!requestPending) { |
... | ... | |
100 | 100 |
})) |
101 | 101 |
} |
102 | 102 |
} |
103 |
} |
|
103 |
}, [dispatch, createNote]); |
|
104 | ||
104 | 105 | |
105 | 106 | |
106 | 107 |
return ( |
Také k dispozici: Unified diff
#re 10797 NoteListView lazy loading -> scroll load more notes