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,73 +22,61 @@ 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"> <Switch>
<div className="container-fluid"> <Route exact path="/" component={Home} />
<Switch> <Route exact path="/book" component={Book} />
<Route exact path="/" component={Home} /> <Route exact path="/migrations" component={Migrations} />
<Route exact path="/book" component={Book} /> <Route exact path="/reports" component={Reports} />
<Route exact path="/migrations" component={Migrations} /> <Route path="/migrations/:migrationId" component={IDSingle} />
<Route exact path="/reports" component={Reports} /> <Route
<Route path="/migrations/:migrationId" component={IDSingle} /> exact
<Route path="/upcoming-migrations"
exact render={(props) => <GenericList {...props} APILINK="/pending/" />}
path="/upcoming-migrations" />
render={(props) => ( <Route
<GenericList {...props} APILINK="/pending/" /> exact
)} path="/missed"
/> render={(props) => <GenericList {...props} APILINK="/missed/" />}
<Route />
exact <Route
path="/missed" exact
render={(props) => ( path="/completed"
<GenericList {...props} APILINK="/missed/" /> render={(props) => (
)} <GenericList {...props} APILINK="/completed/" />
/> )}
<Route />
exact <Route
path="/completed" exact
render={(props) => ( path="/pending-terminations"
<GenericList {...props} APILINK="/completed/" /> render={(props) => (
)} <GenericList {...props} APILINK="/waitingterm/" />
/> )}
<Route />
exact <Route
path="/pending-terminations" exact
render={(props) => ( path="/all-terminations"
<GenericList {...props} APILINK="/waitingterm/" /> render={(props) => (
)} <GenericList {...props} APILINK="/pendingterm/" />
/> )}
<Route />
exact <Route
path="/all-terminations" exact
render={(props) => ( path="/historical-migrations"
<GenericList {...props} APILINK="/pendingterm/" /> render={(props) => <GenericList {...props} APILINK="/all/" />}
)} />
/> <Route
<Route exact
exact path="/booked"
path="/historical-migrations" render={(props) => <GenericList {...props} APILINK="/booked/" />}
render={(props) => ( />
<GenericList {...props} APILINK="/all/" /> </Switch>
)} </div>
/> </Router>
<Route // </Provider>
exact
path="/booked"
render={(props) => (
<GenericList {...props} APILINK="/booked/" />
)}
/>
</Switch>
</div>
</div>
</div>
</Router>
</Provider>
); );
} }
} }