Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
title,
group,
createdOn: moment(),
onClick,
status: NotificationStatus.NEW
};
}
/**
* Add or Update Notifications to Redux Store.
*
* @export addOrUpdateNotification
* @param {Array of NotificationItemPropTypes} items
* @returns
*/
export const addOrUpdateNotifications = makeActionCreator(TYPES.AddedOrUpdated);
/**
* Delete the Notitications
*
* @export deleteNotifications
* @param {Array of NotificationItemPropTypes} items
* @returns
*/
export const deleteNotifications = makeActionCreator(TYPES.Deleted);
/**
* Create notification Item by calling newNotification and then call addOrUpdateNotification to add to Redux Store.
*
* @export notify
* @param {NotificationType} type
* @param {string} message
* Add or Update Notifications to Redux Store.
*
* @export addOrUpdateNotification
* @param {Array of NotificationItemPropTypes} items
* @returns
*/
export const addOrUpdateNotifications = makeActionCreator(TYPES.AddedOrUpdated);
/**
* Delete the Notitications
*
* @export deleteNotifications
* @param {Array of NotificationItemPropTypes} items
* @returns
*/
export const deleteNotifications = makeActionCreator(TYPES.Deleted);
/**
* Create notification Item by calling newNotification and then call addOrUpdateNotification to add to Redux Store.
*
* @export notify
* @param {NotificationType} type
* @param {string} message
* @param {string?} title
* @param {string?} group
* @param {func?} onClick
* @returns
*/
export function notify(type, message, title, group, onClick) {
return addOrUpdateNotifications(
newNotification(type, message, title, group, onClick)
);
import { makeAsyncReducer } from "redux-toolbelt";
import actions from "./Actions";
const chartsReducer = makeAsyncReducer(actions.getChartData);
const generalReducer = makeAsyncReducer(actions.getGeneral);
export default {
chartsReducer,
generalReducer
};
import { makeAsyncReducer } from "redux-toolbelt";
import actions from "./Actions";
const chartsReducer = makeAsyncReducer(actions.getChartData);
const generalReducer = makeAsyncReducer(actions.getGeneral);
export default {
chartsReducer,
generalReducer
};