From a9c5d8f1460e61327489db7858dc071e0204b7ea Mon Sep 17 00:00:00 2001 From: Jade McGough Date: Fri, 7 Apr 2017 15:12:13 -0700 Subject: [PATCH] pass expected arguments to notify action --- ui/src/App.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ui/src/App.js b/ui/src/App.js index 511e38646..33d493124 100644 --- a/ui/src/App.js +++ b/ui/src/App.js @@ -25,19 +25,25 @@ const App = React.createClass({ notify: func.isRequired, }, + handleAddFlashMessage({type, text}) { + const {notify} = this.props + + notify(type, text) + }, + render() { - const {params: {sourceID}, location, notify} = this.props + const {params: {sourceID}, location} = this.props return (
{this.props.children && React.cloneElement(this.props.children, { - addFlashMessage: notify, + addFlashMessage: this.handleAddFlashMessage, })}
)