File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ const AddAnnouncementForm: FunctionComponent<AddAnnouncementProps> = ({ onAnnoun
98
98
{ ...register ( 'startDate' ) }
99
99
name = { START_DATE }
100
100
label = { intl . formatMessage ( { id : 'banners.table.startDate' } ) }
101
- onChange = { ( newValue ) => setValue ( 'startDate' , newValue ) }
101
+ onChange = { ( newValue ) => setValue ( 'startDate' , newValue ?. toString ) }
102
102
/>
103
103
</ LocalizationProvider >
104
104
</ Grid >
@@ -108,7 +108,7 @@ const AddAnnouncementForm: FunctionComponent<AddAnnouncementProps> = ({ onAnnoun
108
108
{ ...register ( 'endDate' ) }
109
109
name = { END_DATE }
110
110
label = { intl . formatMessage ( { id : 'banners.table.endDate' } ) }
111
- onChange = { ( newValue ) => setValue ( 'endDate' , newValue ) }
111
+ onChange = { ( newValue ) => setValue ( 'endDate' , newValue ?. toString ) }
112
112
/>
113
113
</ LocalizationProvider >
114
114
</ Grid >
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ const AnnouncementsPage: FunctionComponent = () => {
72
72
) ;
73
73
74
74
const refreshGrid = useCallback ( ( ) => {
75
- gridRef . current . context ?. refresh ( ) ;
75
+ gridRef . current ? .context ?. refresh ( ) ;
76
76
} , [ ] ) ;
77
77
78
78
const handleDeleteAnnouncement = useCallback (
Original file line number Diff line number Diff line change @@ -328,13 +328,13 @@ export function fetchAnnouncementList(): Promise<Announcement[]> {
328
328
return backendFetchJson ( `${ USER_ADMIN_URL } /announcements` , { method : 'get' } ) . catch ( ( reason ) => {
329
329
console . error ( `Error while fetching announcement : ${ reason } ` ) ;
330
330
throw reason ;
331
- } ) ;
331
+ } ) as Promise < Announcement [ ] > ;
332
332
}
333
333
334
334
export function deleteAnnouncement ( announcementId : UUID ) : Promise < void > {
335
335
console . debug ( `Deleting announcement ...` ) ;
336
336
return backendFetch ( `${ USER_ADMIN_URL } /announcements/${ announcementId } ` , { method : 'delete' } ) . catch ( ( reason ) => {
337
337
console . error ( `Error while deleting announcement : ${ reason } ` ) ;
338
338
throw reason ;
339
- } ) ;
339
+ } ) as Promise < void > ;
340
340
}
You can’t perform that action at this time.
0 commit comments