UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

25 lines (21 loc) 565 B
import * as actionTypes from '../constants/SearchPageConstants'; import FlashNotificationModel from '../models/FlashNotificationModel'; let nextMessageId = 1; export const addFlashNotification = (type, content) => { const id = nextMessageId; nextMessageId += 1; return { type: actionTypes.FLASH_NOTIFICATION_ADD, payload: new FlashNotificationModel({ id: `note_${id}`, type, content, }), }; }; export const removeFlashNotification = (id) => ( { type: actionTypes.FLASH_NOTIFICATION_REMOVE, payload: { id }, } );