mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-21 21:06:58 +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
@@ -39,10 +39,14 @@ const UserPage = (props)=>{
|
||||
}] : [])
|
||||
];
|
||||
|
||||
const clearError = ()=>{
|
||||
setError(null);
|
||||
};
|
||||
|
||||
const navItems = (
|
||||
<Navbar>
|
||||
<Nav.section>
|
||||
{error && (<ErrorNavItem error={error} parent={null}></ErrorNavItem>)}
|
||||
{error && (<ErrorNavItem error={error} clearError={clearError}></ErrorNavItem>)}
|
||||
<NewBrew />
|
||||
<HelpNavItem />
|
||||
<VaultNavitem />
|
||||
|
||||
Reference in new issue
Block a user