diff --git a/app/frontend/src/javascript/components/events/events-settings.tsx b/app/frontend/src/javascript/components/events/events-settings.tsx index 51d52390d..2c37174ae 100644 --- a/app/frontend/src/javascript/components/events/events-settings.tsx +++ b/app/frontend/src/javascript/components/events/events-settings.tsx @@ -18,7 +18,7 @@ declare const Application: IApplication; interface EventsSettingsProps { onError: (message: string) => void, onSuccess: (message: string) => void - uiRouter: UIRouter + uiRouter?: UIRouter } /** @@ -60,7 +60,7 @@ export const EventsSettings: React.FC = ({ onError, onSucce {t('app.admin.events_settings.save')}
- + {uiRouter && }
void, onSuccess: (message: string) => void, beforeSubmit?: (data: Record) => void, - uiRouter: UIRouter + uiRouter?: UIRouter } /** @@ -62,7 +62,7 @@ export const MachinesSettings: React.FC = ({ onError, onS {t('app.admin.machines_settings.save')} - + {uiRouter && }
= ({ onError }) => { }; return ( -
+

{t('app.logged.notifications_list.notifications')}

{totals.unread > 0 && diff --git a/app/frontend/src/javascript/components/trainings/trainings-settings.tsx b/app/frontend/src/javascript/components/trainings/trainings-settings.tsx index 1401ed44b..7e995ce76 100644 --- a/app/frontend/src/javascript/components/trainings/trainings-settings.tsx +++ b/app/frontend/src/javascript/components/trainings/trainings-settings.tsx @@ -21,7 +21,7 @@ declare const Application: IApplication; interface TrainingsSettingsProps { onError: (message: string) => void, onSuccess: (message: string) => void, - uiRouter: UIRouter + uiRouter?: UIRouter } /** @@ -71,7 +71,7 @@ export const TrainingsSettings: React.FC = ({ onError, o handleSubmit(onSubmit)()} className='save-btn is-main'>{t('app.admin.trainings_settings.save')}
- + {uiRouter && }
{ + test('should render the correct list', async () => { + const onError = jest.fn(); + + render(); + await waitFor(() => screen.getByTestId('notifications-list')); + }); +});