Skip to content

Commit

Permalink
feat(neuron-ui): hide the top alert on removing the last error messag…
Browse files Browse the repository at this point in the history
…e from the notification panel
  • Loading branch information
Keith-CY committed Aug 1, 2019
1 parent 6b2f974 commit e23d331
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/neuron-ui/src/states/stateProvider/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ export const reducer = (
},
notifications: app.notifications.filter(({ timestamp }) => timestamp !== payload),
showAllNotifications: app.notifications.length > 1,
showTopAlert:
app.notifications.findIndex(message => message.timestamp === payload) === app.notifications.length - 1
? false
: app.showTopAlert,
},
}
}
Expand Down

0 comments on commit e23d331

Please sign in to comment.