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 {
1111 linkedin
1212 avatar
1313 creationDate
14+ phoneNumber
1415 rating {
1516 rating
1617 }
Original file line number Diff line number Diff line change @@ -172,12 +172,11 @@ const EditLecture: FC<IEditLecture> = ({
172172 navigate ( "/" ) ;
173173 } ) ( ) ;
174174 } ;
175-
176- const handleDeleteLectureFile = async ( fileId : string ) => {
175+ const handleDeleteLectureFile = ( fileId : string ) => {
177176 setDeletedLectureFileIds ( ( prev ) => [ ...prev , fileId ] ) ;
178177 } ;
179178
180- const handleDeleteHomeworkFile = async ( fileId : string ) => {
179+ const handleDeleteHomeworkFile = ( fileId : string ) => {
181180 setDeletedHomeworkFileIds ( ( prev ) => [ ...prev , fileId ] ) ;
182181 } ;
183182
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ const InputPhone = <T extends FieldValues>({
2121 < Autocomplete
2222 options = { countries }
2323 freeSolo
24+ inputValue = { value }
25+ onInputChange = { ( _ , newInputValue ) => onChange ( newInputValue ) }
2426 getOptionLabel = { ( option ) => {
2527 if ( typeof option === "string" ) {
2628 return option ;
@@ -41,12 +43,7 @@ const InputPhone = <T extends FieldValues>({
4143 ) }
4244 renderInput = { ( params ) => (
4345 < TextField
44- value = { value }
45- onChange = { onChange }
4646 { ...params }
47- inputProps = { {
48- ...params . inputProps ,
49- } }
5047 label = { label }
5148 placeholder = { placeholder }
5249 InputLabelProps = { InputLabelProps }
Original file line number Diff line number Diff line change @@ -36,5 +36,5 @@ export interface ITextEditor {
3636 content ?: Maybe < string > ;
3737 setPendingFiles ?: React . Dispatch < React . SetStateAction < PendingFile [ ] > > ;
3838 source : FileSourceType ;
39- handleDeleteFile ?: ( fileId : string ) => Promise < void > ;
39+ handleDeleteFile ?: ( fileId : string ) => void ;
4040}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ const SendComment: FC<ISendComment> = (props) => {
9797 }
9898 } ;
9999
100- const handleDeleteFile = async ( fileId : string ) => {
100+ const handleDeleteFile = ( fileId : string ) => {
101101 if ( fileId . startsWith ( "blob:" ) ) {
102102 setPendingFiles ( ( prev ) =>
103103 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) => {
100100 }
101101 } ;
102102
103- const handleDeleteFile = async ( fileId : string ) => {
103+ const handleDeleteFile = ( fileId : string ) => {
104104 if ( fileId . startsWith ( "blob:" ) ) {
105105 setPendingFiles ( ( prev ) =>
106106 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) => {
7373 }
7474 } ;
7575
76- const handleDeleteFile = async ( fileId : string ) => {
76+ const handleDeleteFile = ( fileId : string ) => {
7777 if ( fileId . startsWith ( "blob:" ) ) {
7878 setPendingFiles ( ( prev ) =>
7979 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) => {
7272 }
7373 } ;
7474
75- const handleDeleteFile = async ( fileId : string ) => {
75+ const handleDeleteFile = ( fileId : string ) => {
7676 if ( fileId . startsWith ( "blob:" ) ) {
7777 setPendingFiles ( ( prev ) =>
7878 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<{
2121 key : new PluginKey ( "file-deletion-tracker" ) ,
2222 appendTransaction ( transactions , oldState , newState ) {
2323 const docChanged = transactions . some ( ( tr ) => tr . docChanged ) ;
24- if ( ! docChanged ) return ;
24+ if ( ! docChanged ) return null ;
2525
2626 const oldFileIds = collectFileIds ( oldState . doc ) ;
2727 const newFileIds = collectFileIds ( newState . doc ) ;
@@ -36,7 +36,7 @@ export const FileDeletionTracker = Extension.create<{
3636 } ) ;
3737 }
3838
39- return undefined ;
39+ return null ;
4040 } ,
4141 } ) ,
4242 ] ;
You can’t perform that action at this time.
0 commit comments