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 = {
99 mentionLabel : string ;
1010} ;
1111
12+ export type FileSourceType =
13+ | "lectureHomework"
14+ | "lecture"
15+ | "studentHomework"
16+ | "comment" ;
17+
1218export type PendingFile = {
1319 file : File ;
1420 localUrl : string ;
15- source : "lectureHomework" | "lecture" | "studentHomework" ;
21+ source : FileSourceType ;
1622} ;
1723
1824export type SuggestionListRef = {
@@ -29,5 +35,5 @@ export interface ITextEditor {
2935 rteRef : RefObject < RichTextEditorRef > ;
3036 content ?: Maybe < string > ;
3137 setPendingFiles ?: React . Dispatch < React . SetStateAction < PendingFile [ ] > > ;
32- source : "lectureHomework" | "lecture" | "studentHomework" ;
38+ source : FileSourceType ;
3339}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ const AnswerComment: FC<IAnswerComment> = (props) => {
5050 < StyledCommentBox >
5151 < form >
5252 < StyledBox >
53- < CommentEditor rteRef = { rteRef } />
53+ < CommentEditor rteRef = { rteRef } source = "comment" />
5454 { error && < StyledFormHelperText > { error } </ StyledFormHelperText > }
5555 </ StyledBox >
5656 < SendButtons
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const SendComment: FC<ISendComment> = (props) => {
3636 return (
3737 < form >
3838 < StyledBox >
39- < CommentEditor rteRef = { rteRef } />
39+ < CommentEditor rteRef = { rteRef } source = "comment" />
4040 { error && < StyledFormHelperText > { error } </ StyledFormHelperText > }
4141 </ StyledBox >
4242 < 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) => {
4141 < form >
4242 < StyledStack >
4343 < StyledBox >
44- < CommentEditor content = { content } rteRef = { rteRef } />
44+ < CommentEditor content = { content } rteRef = { rteRef } source = "comment" />
4545 { error && < StyledFormHelperText > { error } </ StyledFormHelperText > }
4646 < SendButtons
4747 onReply = { handleUpdateComment }
You can’t perform that action at this time.
0 commit comments