2017-09-10 05:35:10 -08:00
|
|
|
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
|
2020-01-02 09:27:27 -09:00
|
|
|
import {HyperActions} from '../hyper';
|
2016-07-13 12:44:24 -08:00
|
|
|
|
2020-01-02 09:27:27 -09:00
|
|
|
export function dismissNotification(id: string): HyperActions {
|
2016-07-13 12:44:24 -08:00
|
|
|
return {
|
|
|
|
|
type: NOTIFICATION_DISMISS,
|
|
|
|
|
id
|
|
|
|
|
};
|
|
|
|
|
}
|
2016-10-04 11:41:54 -08:00
|
|
|
|
2020-01-02 09:27:27 -09:00
|
|
|
export function addNotificationMessage(text: string, url: string | null = null, dismissable = true): HyperActions {
|
2016-10-04 11:41:54 -08:00
|
|
|
return {
|
|
|
|
|
type: NOTIFICATION_MESSAGE,
|
|
|
|
|
text,
|
|
|
|
|
url,
|
|
|
|
|
dismissable
|
|
|
|
|
};
|
|
|
|
|
}
|