mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 07:56:50 +00:00
Refactor ErrorNavItem to not need "this" parameter
Toward making edit/new/home pages functional, which do not have "this"
This commit is contained in:
1 parent
d01f4fb77e
commit
8671404bdc
5 files changed
+155
-148
No files matched your search
@@ -211,6 +211,13 @@ const NewPage = createClass({
|
||||
}
|
||||
},
|
||||
|
||||
clearError : function(){
|
||||
setState({
|
||||
error : null,
|
||||
isSaving : false
|
||||
})
|
||||
},
|
||||
|
||||
renderNavbar : function(){
|
||||
return <Navbar>
|
||||
|
||||
@@ -220,7 +227,7 @@ const NewPage = createClass({
|
||||
|
||||
<Nav.section>
|
||||
{this.state.error ?
|
||||
<ErrorNavItem error={this.state.error} parent={this}></ErrorNavItem> :
|
||||
<ErrorNavItem error={this.state.error} clearError={clearError}></ErrorNavItem> :
|
||||
this.renderSaveButton()
|
||||
}
|
||||
<PrintNavItem />
|
||||
|
||||
Reference in new issue
Block a user