fix tests, removed one unused function, fix real problem that tests helped to
surface
This commit is contained in:
parent
48e811e6ed
commit
b18e27c6d4
5 changed files with 62 additions and 81 deletions
|
@ -11,7 +11,7 @@ export const visibleTypes = store => ([
|
|||
|
||||
export const visibleNotificationsFromStore = store => {
|
||||
// map is just to clone the array since sort mutates it and it causes some issues
|
||||
let sortedNotifications = notificationsFromStore(store).map(_ => _).sort((a, b) => a.id > b.id ? -1 : 1)
|
||||
let sortedNotifications = notificationsFromStore(store).map(_ => _).sort((a, b) => a.action.id > b.action.id ? -1 : 1)
|
||||
sortedNotifications = sortBy(sortedNotifications, 'seen')
|
||||
return sortedNotifications.filter((notification) => visibleTypes(store).includes(notification.type))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue