Added getToasts selector
• Added: - getToasts selector
This commit is contained in:
parent
12ca5db281
commit
75ddf2d9e7
@ -165,4 +165,22 @@ export const getOrderedLists = createSelector([state => state.get('lists')], lis
|
|||||||
if (!lists) return lists
|
if (!lists) return lists
|
||||||
|
|
||||||
return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')))
|
return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')))
|
||||||
|
})
|
||||||
|
|
||||||
|
export const getToasts = createSelector([
|
||||||
|
(state) => state.get('toasts'),
|
||||||
|
], (base) => {
|
||||||
|
if (!base) return null
|
||||||
|
|
||||||
|
let arr = []
|
||||||
|
|
||||||
|
base.forEach(item => {
|
||||||
|
arr.push({
|
||||||
|
message: item.get('message'),
|
||||||
|
type: item.get('type'),
|
||||||
|
key: item.get('key'),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
return arr
|
||||||
})
|
})
|
Loading…
x
Reference in New Issue
Block a user