// SPDX-License-Identifier: MIT // Copyright (c) 2020 The Pybricks Authors import { Toaster } from '@blueprintjs/core'; import React from 'react'; import { connect } from 'react-redux'; import { RootState } from '../reducers'; import { NotificationList } from '../reducers/notification'; import Notification from './Notification'; interface StateProps { list: NotificationList; } type NotificationStackProps = StateProps; class NotificationStack extends React.Component { render(): JSX.Element { return ( {this.props.list.map((n) => ( ))} ); } } const mapStateToProps = (state: RootState): StateProps => ({ list: state.notification.list, }); export default connect(mapStateToProps)(NotificationStack);