department-notifications
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -6,2 +6,3 @@ export var NOTIFICATION_ADD = 'NOTIFICATION_ADD'; | ||
var initialState = []; | ||
var nextNotificationId = 0; | ||
@@ -14,2 +15,3 @@ // Actions | ||
type: NOTIFICATION_ADD, | ||
id: nextNotificationId++, | ||
message: message, | ||
@@ -53,5 +55,3 @@ kind: kind | ||
return [].concat(state, [{ | ||
id: state.reduce(function (maxId, notification) { | ||
return Math.max(notification.id, maxId); | ||
}, -1) + 1, | ||
id: action.id, | ||
message: action.message, | ||
@@ -58,0 +58,0 @@ kind: action.kind |
@@ -16,2 +16,3 @@ 'use strict'; | ||
var initialState = []; | ||
var nextNotificationId = 0; | ||
@@ -24,2 +25,3 @@ // Actions | ||
type: NOTIFICATION_ADD, | ||
id: nextNotificationId++, | ||
message: message, | ||
@@ -63,5 +65,3 @@ kind: kind | ||
return [].concat(state, [{ | ||
id: state.reduce(function (maxId, notification) { | ||
return Math.max(notification.id, maxId); | ||
}, -1) + 1, | ||
id: action.id, | ||
message: action.message, | ||
@@ -68,0 +68,0 @@ kind: action.kind |
{ | ||
"name": "department-notifications", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Drop in redux notifications for department.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22963