Make navigation work
This commit is contained in:
19
client/src/common/RoutableNavItem.js
Normal file
19
client/src/common/RoutableNavItem.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { Navbar, NavItem } from 'react-materialize';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
const RoutableNavItem = (props) => {
|
||||
return (
|
||||
<NavItem data-target="mobile-nav" className="sidenav-close" onClick={
|
||||
() => {
|
||||
props.history.push(props.href);
|
||||
}
|
||||
}>
|
||||
{ props.children }
|
||||
</NavItem>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(RoutableNavItem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user