File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
components/text-editor/types Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,16 @@ export type MentionSuggestion = {
9
9
mentionLabel : string ;
10
10
} ;
11
11
12
+ export type FileSourceType =
13
+ | "lectureHomework"
14
+ | "lecture"
15
+ | "studentHomework"
16
+ | "comment" ;
17
+
12
18
export type PendingFile = {
13
19
file : File ;
14
20
localUrl : string ;
15
- source : "lectureHomework" | "lecture" | "studentHomework" ;
21
+ source : FileSourceType ;
16
22
} ;
17
23
18
24
export type SuggestionListRef = {
@@ -29,5 +35,5 @@ export interface ITextEditor {
29
35
rteRef : RefObject < RichTextEditorRef > ;
30
36
content ?: Maybe < string > ;
31
37
setPendingFiles ?: React . Dispatch < React . SetStateAction < PendingFile [ ] > > ;
32
- source : "lectureHomework" | "lecture" | "studentHomework" ;
38
+ source : FileSourceType ;
33
39
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ const AnswerComment: FC<IAnswerComment> = (props) => {
50
50
< StyledCommentBox >
51
51
< form >
52
52
< StyledBox >
53
- < CommentEditor rteRef = { rteRef } />
53
+ < CommentEditor rteRef = { rteRef } source = "comment" />
54
54
{ error && < StyledFormHelperText > { error } </ StyledFormHelperText > }
55
55
</ StyledBox >
56
56
< SendButtons
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const SendComment: FC<ISendComment> = (props) => {
36
36
return (
37
37
< form >
38
38
< StyledBox >
39
- < CommentEditor rteRef = { rteRef } />
39
+ < CommentEditor rteRef = { rteRef } source = "comment" />
40
40
{ error && < StyledFormHelperText > { error } </ StyledFormHelperText > }
41
41
</ StyledBox >
42
42
< SendButtons onReply = { handleSendComment } loading = { loading } hideCancel />
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ const UpdateComment: FC<IUpdateComment> = (props) => {
41
41
< form >
42
42
< StyledStack >
43
43
< StyledBox >
44
- < CommentEditor content = { content } rteRef = { rteRef } />
44
+ < CommentEditor content = { content } rteRef = { rteRef } source = "comment" />
45
45
{ error && < StyledFormHelperText > { error } </ StyledFormHelperText > }
46
46
< SendButtons
47
47
onReply = { handleUpdateComment }
You can’t perform that action at this time.
0 commit comments