File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ const AddAnnouncementForm: FunctionComponent<AddAnnouncementProps> = ({ onAnnoun
9898 { ...register ( 'startDate' ) }
9999 name = { START_DATE }
100100 label = { intl . formatMessage ( { id : 'banners.table.startDate' } ) }
101- onChange = { ( newValue ) => setValue ( 'startDate' , newValue ?. toString ?? '' ) }
101+ onChange = { ( newValue ) => setValue ( 'startDate' , newValue ) }
102102 />
103103 </ LocalizationProvider >
104104 </ Grid >
@@ -108,7 +108,7 @@ const AddAnnouncementForm: FunctionComponent<AddAnnouncementProps> = ({ onAnnoun
108108 { ...register ( 'endDate' ) }
109109 name = { END_DATE }
110110 label = { intl . formatMessage ( { id : 'banners.table.endDate' } ) }
111- onChange = { ( newValue ) => setValue ( 'endDate' , newValue ?. toString ?? '' ) }
111+ onChange = { ( newValue ) => setValue ( 'endDate' , newValue ) }
112112 />
113113 </ LocalizationProvider >
114114 </ Grid >
Original file line number Diff line number Diff line change @@ -333,13 +333,10 @@ export function fetchAnnouncementList(): Promise<Announcement[]> {
333333
334334export function deleteAnnouncement ( announcementId : UUID ) : Promise < void > {
335335 console . debug ( `Deleting announcement ...` ) ;
336- return backendFetch ( `${ USER_ADMIN_URL } /announcements/${ announcementId } ` , { method : 'delete' } ) . catch ( ( reason ) => {
337- console . error ( `Error while deleting announcement : ${ reason } ` ) ;
338- throw reason ;
339- } )
336+ return backendFetch ( `${ USER_ADMIN_URL } /announcements/${ announcementId } ` , { method : 'delete' } )
340337 . then ( ( ) => undefined )
341338 . catch ( ( reason ) => {
342- console . error ( `Error while creating announcement : ${ reason } ` ) ;
339+ console . error ( `Error while deleting announcement : ${ reason } ` ) ;
343340 throw reason ;
344341 } ) ;
345342}
You can’t perform that action at this time.
0 commit comments