Use react-alert for backend message flashing (#3315)

This commit is contained in:
Maxime Beauchemin
2017-08-16 23:00:23 -07:00
committed by GitHub
parent b9a2fa4015
commit 59268e978a
8 changed files with 46 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ class App extends React.PureComponent {
}
return (
<div className="App SqlLab">
<AlertsWrapper />
<AlertsWrapper initMessages={this.props.initMessages} />
<div className="container-fluid">
{content}
</div>
@@ -82,11 +82,13 @@ class App extends React.PureComponent {
App.propTypes = {
alerts: PropTypes.array,
actions: PropTypes.object,
initMessages: PropTypes.array,
};
function mapStateToProps(state) {
return {
alerts: state.alerts,
initMessages: state.flash_messages,
};
}
function mapDispatchToProps(dispatch) {