2023-07-25 02:39:11 -08:00
|
|
|
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../../typings/constants/notifications';
|
2023-07-25 01:39:51 -08:00
|
|
|
import type {HyperActions} from '../../typings/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
|
|
|
|
|
};
|
|
|
|
|
}
|