moving things

This commit is contained in:
Peter Holmberg
2018-10-24 10:23:11 +02:00
parent 3e0a34ceca
commit ed99a543a5
7 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,28 @@
import { AppNotification } from 'app/types/';
export enum ActionTypes {
AddAppNotification = 'ADD_APP_NOTIFICATION',
ClearAppNotification = 'CLEAR_APP_NOTIFICATION',
}
interface AddAppNotificationAction {
type: ActionTypes.AddAppNotification;
payload: AppNotification;
}
interface ClearAppNotificationAction {
type: ActionTypes.ClearAppNotification;
payload: number;
}
export type Action = AddAppNotificationAction | ClearAppNotificationAction;
export const clearAppNotification = (appNotificationId: number) => ({
type: ActionTypes.ClearAppNotification,
payload: appNotificationId,
});
export const addAppNotification = (alert: AppNotification) => ({
type: ActionTypes.AddAppNotification,
payload: alert,
});