Revert the toast display order
New toasts should be displayed immediately.
This commit is contained in:
parent
463e6f5687
commit
55916f0763
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ export default handleActions(
|
||||||
},
|
},
|
||||||
[ACTIONS.DISMISS_TOAST]: (state: NotificationState) => {
|
[ACTIONS.DISMISS_TOAST]: (state: NotificationState) => {
|
||||||
const newToasts: Array<Toast> = state.toasts.slice();
|
const newToasts: Array<Toast> = state.toasts.slice();
|
||||||
newToasts.shift();
|
newToasts.pop();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
|
|
|
@ -31,7 +31,7 @@ export const selectUnseenNotificationCount = createSelector(selectNotifications,
|
||||||
|
|
||||||
export const selectToast = createSelector(selectState, (state) => {
|
export const selectToast = createSelector(selectState, (state) => {
|
||||||
if (state.toasts.length) {
|
if (state.toasts.length) {
|
||||||
const { id, params } = state.toasts[0];
|
const { id, params } = state.toasts[state.toasts.length - 1];
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
...params,
|
...params,
|
||||||
|
|
Loading…
Reference in a new issue