|
|
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
|
|
|
import appEvents from 'app/core/app_events';
|
|
|
import { addAppNotification, clearAppNotification } from './state/actions';
|
|
|
import { connectWithStore } from 'app/core/utils/connectWithReduxStore';
|
|
|
-import { AppNotification, StoreState } from '../../../types';
|
|
|
+import { AppNotification, AppNotificationSeverity, StoreState } from 'app/types';
|
|
|
|
|
|
export interface Props {
|
|
|
appNotifications: AppNotification[];
|
|
|
@@ -10,13 +10,6 @@ export interface Props {
|
|
|
clearAppNotification: typeof clearAppNotification;
|
|
|
}
|
|
|
|
|
|
-enum AppNotificationSeverity {
|
|
|
- Success = 'success',
|
|
|
- Warning = 'warning',
|
|
|
- Error = 'error',
|
|
|
- Info = 'info',
|
|
|
-}
|
|
|
-
|
|
|
export class AppNotificationList extends PureComponent<Props> {
|
|
|
componentDidMount() {
|
|
|
appEvents.on('alert-warning', options => this.addAppNotification(options[0], options[1], 'warning', 5000));
|