Commit cfdb552b authored by Rémy Huet's avatar Rémy Huet 💻

Add materials route

parent 013090aa
Pipeline #32383 passed with stage
in 3 minutes and 4 seconds
......@@ -9,6 +9,7 @@ import Login from './pages/Login';
import PageContainer from './components/Container/PageContainer';
import Categories from './pages/Categories';
import Infrastructures from './pages/Infrastructures';
import Materials from './pages/Materials';
function App(props) {
const { userIdentified } = props;
......@@ -19,6 +20,7 @@ function App(props) {
<Route path="/login" component={Login} />
<PrivateRoute path="/categories/:action?/:category?" component={Categories} userIdentified={userIdentified} />
<PrivateRoute path="/infrastructures/:action?/:infrastructure?" component={Infrastructures} userIdentified={userIdentified} />
<PrivateRoute path="/materials/:action?/:material?" component={Materials} userIdentified={userIdentified} />
</>
</PageContainer>
</BrowserRouter>
......
......@@ -18,6 +18,9 @@ function MenuItems({
<Menu.Item as={Link} to="/infrastructures" name="/infrastructures" active={activeItem === '/infrastructures'} onClick={onClick}>
Infrastructures
</Menu.Item>
<Menu.Item as={Link} to="/materials" name="/materials" active={activeItem === '/materials'} onClick={onClick}>
Matériel
</Menu.Item>
{!userIdentified && (
<Menu.Item as={Link} to="/login" position="right" onClick={onClick}>
<Button inverted={!fixed}>
......
import React from 'react';
import { connect } from 'react-redux';
function Materials() {
return (
<h1>Hello</h1>
);
}
export default connect()(Materials);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment