preparing for redux

This commit is contained in:
pepper 2021-01-20 00:00:00 -05:00
parent 9c9c584a84
commit 587e8ef70d

View File

@ -1,9 +1,10 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
// Store // Store currently in progress
import { Provider } from "react-redux";
import store from "../redux/store"; // import { Provider } from "react-redux";
// import store from "../redux/store";
// Routes // Routes
import Migrations from "./root/Pages/Migrations"; import Migrations from "./root/Pages/Migrations";
@ -21,12 +22,10 @@ import Navigation from "./root/Navigation";
class App extends Component { class App extends Component {
render() { render() {
return ( return (
<Provider store={store}> // <Provider store={store}>
<Router> <Router>
<Navigation /> <Navigation />
<div className="row"> <div className="col 13">
<div className="col s12 m4 13">
<div className="container-fluid">
<Switch> <Switch>
<Route exact path="/" component={Home} /> <Route exact path="/" component={Home} />
<Route exact path="/book" component={Book} /> <Route exact path="/book" component={Book} />
@ -36,16 +35,12 @@ class App extends Component {
<Route <Route
exact exact
path="/upcoming-migrations" path="/upcoming-migrations"
render={(props) => ( render={(props) => <GenericList {...props} APILINK="/pending/" />}
<GenericList {...props} APILINK="/pending/" />
)}
/> />
<Route <Route
exact exact
path="/missed" path="/missed"
render={(props) => ( render={(props) => <GenericList {...props} APILINK="/missed/" />}
<GenericList {...props} APILINK="/missed/" />
)}
/> />
<Route <Route
exact exact
@ -71,23 +66,17 @@ class App extends Component {
<Route <Route
exact exact
path="/historical-migrations" path="/historical-migrations"
render={(props) => ( render={(props) => <GenericList {...props} APILINK="/all/" />}
<GenericList {...props} APILINK="/all/" />
)}
/> />
<Route <Route
exact exact
path="/booked" path="/booked"
render={(props) => ( render={(props) => <GenericList {...props} APILINK="/booked/" />}
<GenericList {...props} APILINK="/booked/" />
)}
/> />
</Switch> </Switch>
</div> </div>
</div>
</div>
</Router> </Router>
</Provider> // </Provider>
); );
} }
} }