Skip to content

Commit e23d331

Browse files
committed
feat(neuron-ui): hide the top alert on removing the last error message from the notification panel
1 parent 6b2f974 commit e23d331

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • packages/neuron-ui/src/states/stateProvider

packages/neuron-ui/src/states/stateProvider/reducer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,10 @@ export const reducer = (
424424
},
425425
notifications: app.notifications.filter(({ timestamp }) => timestamp !== payload),
426426
showAllNotifications: app.notifications.length > 1,
427+
showTopAlert:
428+
app.notifications.findIndex(message => message.timestamp === payload) === app.notifications.length - 1
429+
? false
430+
: app.showTopAlert,
427431
},
428432
}
429433
}

0 commit comments

Comments
 (0)