File tree Expand file tree Collapse file tree 9 files changed +12
-15
lines changed
features/edit-training/views/edit-lecture
lib/mui-tiptap/extensions Expand file tree Collapse file tree 9 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ query user {
11
11
linkedin
12
12
avatar
13
13
creationDate
14
+ phoneNumber
14
15
rating {
15
16
rating
16
17
}
Original file line number Diff line number Diff line change @@ -172,12 +172,11 @@ const EditLecture: FC<IEditLecture> = ({
172
172
navigate ( "/" ) ;
173
173
} ) ( ) ;
174
174
} ;
175
-
176
- const handleDeleteLectureFile = async ( fileId : string ) => {
175
+ const handleDeleteLectureFile = ( fileId : string ) => {
177
176
setDeletedLectureFileIds ( ( prev ) => [ ...prev , fileId ] ) ;
178
177
} ;
179
178
180
- const handleDeleteHomeworkFile = async ( fileId : string ) => {
179
+ const handleDeleteHomeworkFile = ( fileId : string ) => {
181
180
setDeletedHomeworkFileIds ( ( prev ) => [ ...prev , fileId ] ) ;
182
181
} ;
183
182
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ const InputPhone = <T extends FieldValues>({
21
21
< Autocomplete
22
22
options = { countries }
23
23
freeSolo
24
+ inputValue = { value }
25
+ onInputChange = { ( _ , newInputValue ) => onChange ( newInputValue ) }
24
26
getOptionLabel = { ( option ) => {
25
27
if ( typeof option === "string" ) {
26
28
return option ;
@@ -41,12 +43,7 @@ const InputPhone = <T extends FieldValues>({
41
43
) }
42
44
renderInput = { ( params ) => (
43
45
< TextField
44
- value = { value }
45
- onChange = { onChange }
46
46
{ ...params }
47
- inputProps = { {
48
- ...params . inputProps ,
49
- } }
50
47
label = { label }
51
48
placeholder = { placeholder }
52
49
InputLabelProps = { InputLabelProps }
Original file line number Diff line number Diff line change @@ -36,5 +36,5 @@ export interface ITextEditor {
36
36
content ?: Maybe < string > ;
37
37
setPendingFiles ?: React . Dispatch < React . SetStateAction < PendingFile [ ] > > ;
38
38
source : FileSourceType ;
39
- handleDeleteFile ?: ( fileId : string ) => Promise < void > ;
39
+ handleDeleteFile ?: ( fileId : string ) => void ;
40
40
}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ const SendComment: FC<ISendComment> = (props) => {
97
97
}
98
98
} ;
99
99
100
- const handleDeleteFile = async ( fileId : string ) => {
100
+ const handleDeleteFile = ( fileId : string ) => {
101
101
if ( fileId . startsWith ( "blob:" ) ) {
102
102
setPendingFiles ( ( prev ) =>
103
103
prev . filter ( ( pending ) => pending . localUrl !== fileId )
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const SendHomework: FC<ISendHomeWork> = (props) => {
100
100
}
101
101
} ;
102
102
103
- const handleDeleteFile = async ( fileId : string ) => {
103
+ const handleDeleteFile = ( fileId : string ) => {
104
104
if ( fileId . startsWith ( "blob:" ) ) {
105
105
setPendingFiles ( ( prev ) =>
106
106
prev . filter ( ( pending ) => pending . localUrl !== fileId )
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ const UpdateComment: FC<IUpdateComment> = (props) => {
73
73
}
74
74
} ;
75
75
76
- const handleDeleteFile = async ( fileId : string ) => {
76
+ const handleDeleteFile = ( fileId : string ) => {
77
77
if ( fileId . startsWith ( "blob:" ) ) {
78
78
setPendingFiles ( ( prev ) =>
79
79
prev . filter ( ( pending ) => pending . localUrl !== fileId )
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ const UpdateHomework: FC<IUpdateHomeWork> = (props) => {
72
72
}
73
73
} ;
74
74
75
- const handleDeleteFile = async ( fileId : string ) => {
75
+ const handleDeleteFile = ( fileId : string ) => {
76
76
if ( fileId . startsWith ( "blob:" ) ) {
77
77
setPendingFiles ( ( prev ) =>
78
78
prev . filter ( ( pending ) => pending . localUrl !== fileId )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export const FileDeletionTracker = Extension.create<{
21
21
key : new PluginKey ( "file-deletion-tracker" ) ,
22
22
appendTransaction ( transactions , oldState , newState ) {
23
23
const docChanged = transactions . some ( ( tr ) => tr . docChanged ) ;
24
- if ( ! docChanged ) return ;
24
+ if ( ! docChanged ) return null ;
25
25
26
26
const oldFileIds = collectFileIds ( oldState . doc ) ;
27
27
const newFileIds = collectFileIds ( newState . doc ) ;
@@ -36,7 +36,7 @@ export const FileDeletionTracker = Extension.create<{
36
36
} ) ;
37
37
}
38
38
39
- return undefined ;
39
+ return null ;
40
40
} ,
41
41
} ) ,
42
42
] ;
You can’t perform that action at this time.
0 commit comments