diff --git a/src/views/loading/LoadingView.tsx b/src/views/loading/LoadingView.tsx index dc211be6..4d498951 100644 --- a/src/views/loading/LoadingView.tsx +++ b/src/views/loading/LoadingView.tsx @@ -1,7 +1,6 @@ import { FC, useEffect, useState } from 'react'; import { NitroLayoutFlexColumn } from '../../layout'; import { NitroLayoutBase } from '../../layout/base'; -import { NotificationAlertType } from '../notification-center/common/NotificationAlertType'; import { NotificationUtilities } from '../notification-center/common/NotificationUtilities'; import { LoadingViewProps } from './LoadingView.types'; @@ -14,7 +13,7 @@ export const LoadingView: FC = props => { if(!isError) return; - NotificationUtilities.simpleAlert(message, NotificationAlertType.DEFAULT, null, null, 'Connection Error'); + NotificationUtilities.simpleAlert(message, null, null, null, 'Connection Error'); }, [ isError, message ]); useEffect(() => diff --git a/src/views/notification-center/common/NotificationUtilities.ts b/src/views/notification-center/common/NotificationUtilities.ts index 891713af..1ee727d0 100644 --- a/src/views/notification-center/common/NotificationUtilities.ts +++ b/src/views/notification-center/common/NotificationUtilities.ts @@ -112,10 +112,12 @@ export class NotificationUtilities dispatchUiEvent(new NotificationAlertEvent(messages, NotificationAlertType.MOTD, null, null, LocalizeText('notifications.motd.title'))); } - public static simpleAlert(message: string, type: string, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null): void + public static simpleAlert(message: string, type: string = null, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null): void { if(!title || !title.length) title = LocalizeText('notifications.broadcast.title'); + if(!type || !type.length) type = NotificationAlertType.DEFAULT; + dispatchUiEvent(new NotificationAlertEvent([ this.cleanText(message) ], type, clickUrl, clickUrlText, title, imageUrl)); }