|
|
@@ -1,9 +1,13 @@
|
|
|
import { BrowserRouter as Router, Route, Link, NavLink } from "react-router-dom";
|
|
|
import React, { Component, Props } from 'react';
|
|
|
+import { Provider } from 'react-redux';
|
|
|
import CBKDrawer from './components/Drawer';
|
|
|
-import List, {ListItem, ListItemText} from '@material/react-list';
|
|
|
-
|
|
|
+import { Grid, Row } from '@material/react-layout-grid';
|
|
|
+import List, { ListItem, ListItemText } from '@material/react-list';
|
|
|
+import configureStore from 'store/configureStore';
|
|
|
+import Recipes from "containers/recipes";
|
|
|
import './styles/app.scss';
|
|
|
+import "@material/react-layout-grid/dist/layout-grid.min.css";
|
|
|
|
|
|
function Index() {
|
|
|
return <h2>Home</h2>;
|
|
|
@@ -13,6 +17,8 @@ function Users() {
|
|
|
return <h2>Users</h2>;
|
|
|
}
|
|
|
|
|
|
+const store = configureStore();
|
|
|
+
|
|
|
class App extends Component<{}, {}> {
|
|
|
navbarItems: { title: string, path: string, active: boolean }[]
|
|
|
|
|
|
@@ -27,19 +33,31 @@ class App extends Component<{}, {}> {
|
|
|
|
|
|
render() {
|
|
|
return (
|
|
|
- <Router>
|
|
|
- <CBKDrawer>
|
|
|
- {
|
|
|
- this.navbarItems.map((item, i) => (
|
|
|
- <NavLink
|
|
|
- to={item.path}
|
|
|
- activeClassName='active'
|
|
|
- key={i}
|
|
|
- >{item.title}</NavLink>
|
|
|
- ))
|
|
|
- }
|
|
|
- </CBKDrawer>
|
|
|
- </Router>
|
|
|
+ <Provider store={store}>
|
|
|
+ <Router>
|
|
|
+ <CBKDrawer>
|
|
|
+ {
|
|
|
+ this.navbarItems.map((item, i) => (
|
|
|
+ <NavLink
|
|
|
+ to={item.path}
|
|
|
+ activeClassName='active'
|
|
|
+ key={i}
|
|
|
+ >{item.title}</NavLink>
|
|
|
+ ))
|
|
|
+ }
|
|
|
+ </CBKDrawer>
|
|
|
+ <Grid className="cbk-grid">
|
|
|
+ <Row>
|
|
|
+ <Route path="/recipes" component={Recipes}>
|
|
|
+ </Route>
|
|
|
+ <Route path="/planner">
|
|
|
+ </Route>
|
|
|
+ <Route path="/planner">
|
|
|
+ </Route>
|
|
|
+ </Row>
|
|
|
+ </Grid>
|
|
|
+ </Router>
|
|
|
+ </Provider>
|
|
|
)
|
|
|
}
|
|
|
}
|