|
@@ -11,16 +11,14 @@ import {
|
|
import Loader from "./components/loader"
|
|
import Loader from "./components/loader"
|
|
import Header from "./components/header/index"
|
|
import Header from "./components/header/index"
|
|
import Main from "./components/main/Main";
|
|
import Main from "./components/main/Main";
|
|
-import Doctors from "./components/specialists/doctors";
|
|
|
|
-import MoreInfo from "./components/specialists/MoreInfo"
|
|
|
|
-// import Service from "./components/Service";
|
|
|
|
|
|
+import Doctors from "./components/specialists/Doctors";
|
|
import Services from "./components/Services"
|
|
import Services from "./components/Services"
|
|
|
|
+import MoreInfo from "./components/specialists/MoreInfo"
|
|
import Appointment from "./components/Appointment";
|
|
import Appointment from "./components/Appointment";
|
|
|
|
+import Reviews from "./components/Reviews"
|
|
|
|
+import Admin from './components/Admin/Admin'
|
|
import Auth from './containers/auth'
|
|
import Auth from './containers/auth'
|
|
import Footer from "./components/Footer";
|
|
import Footer from "./components/Footer";
|
|
-import Admin from './components/Admin/Admin'
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
export class App extends React.Component {
|
|
export class App extends React.Component {
|
|
|
|
|
|
@@ -28,28 +26,6 @@ export class App extends React.Component {
|
|
this.props.getDoctors();
|
|
this.props.getDoctors();
|
|
this.props.getServices();
|
|
this.props.getServices();
|
|
|
|
|
|
- // fetch("https://api-clinics.herokuapp.com/api/v1/orders", {
|
|
|
|
- // method: "GET",
|
|
|
|
- // credentials: "include"
|
|
|
|
- // })
|
|
|
|
- // .then(res => res.json())
|
|
|
|
- // .then(res => console.log (res))
|
|
|
|
-
|
|
|
|
- // fetch("https://api-clinics.herokuapp.com/api/v1/services", {
|
|
|
|
- // method: "GET",
|
|
|
|
- // credentials: "include"
|
|
|
|
- // })
|
|
|
|
- // .then(res => res.json())
|
|
|
|
- // .then(res => console.log (res))
|
|
|
|
-
|
|
|
|
- // fetch("https://api-clinics.herokuapp.com/api/v1/doctors",{
|
|
|
|
- // method: "GET",
|
|
|
|
- // credentials:"include"
|
|
|
|
- // })
|
|
|
|
- // .then(res => res.json())
|
|
|
|
- // .then(res => console.log (res))
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
// fetch ("https://api-clinics.herokuapp.com/api/v1/auth/login", {
|
|
// fetch ("https://api-clinics.herokuapp.com/api/v1/auth/login", {
|
|
// method : "POST",
|
|
// method : "POST",
|
|
// credentials: "include",
|
|
// credentials: "include",
|
|
@@ -66,29 +42,18 @@ export class App extends React.Component {
|
|
}
|
|
}
|
|
|
|
|
|
render() {
|
|
render() {
|
|
- // console.log(this.props.app)
|
|
|
|
return (
|
|
return (
|
|
<Loader flag={this.props.isFetching}>
|
|
<Loader flag={this.props.isFetching}>
|
|
<Header/>
|
|
<Header/>
|
|
<Switch>
|
|
<Switch>
|
|
<Route exact path="/" component={Main} />
|
|
<Route exact path="/" component={Main} />
|
|
- <Route exact path="/doctors" render={() => <Doctors data={this.props.app.doctors} /> } />
|
|
|
|
- <Route exact path="/doctors/:doctor" render={(props) =>
|
|
|
|
- <MoreInfo
|
|
|
|
- his={props}
|
|
|
|
- data={this.props.app.doctors}
|
|
|
|
- />}
|
|
|
|
- />
|
|
|
|
- <Route exact path="/services" render={() => <Services data={this.props.app.services} />} />
|
|
|
|
- <Route exact path="/reviews" render={() => <div>Reviews</div>} />
|
|
|
|
|
|
+ <Route exact path="/doctors" component={Doctors} />
|
|
|
|
+ <Route exact path="/services" component={Services} />
|
|
|
|
+ <Route exact path="/doctors/:doctor" component={MoreInfo} />
|
|
|
|
+ <Route exact path="/services/:service" component={MoreInfo} />
|
|
|
|
+ <Route exact path="/reviews" component={Reviews}/>
|
|
<Route path="/admin/" component={Admin} />
|
|
<Route path="/admin/" component={Admin} />
|
|
- <Route exact path="/services/:service" render={(props) =>
|
|
|
|
- <MoreInfo
|
|
|
|
- his={props}
|
|
|
|
- data={this.props.app.services}
|
|
|
|
- />}
|
|
|
|
- />
|
|
|
|
- <Route path="/appointment/:doctorId" component={Appointment}/>
|
|
|
|
|
|
+ <Route exact path="/appointment/:doctorId" component={Appointment}/>
|
|
<Route exact path="/auth" component={Auth} />
|
|
<Route exact path="/auth" component={Auth} />
|
|
</Switch>
|
|
</Switch>
|
|
<Footer/>
|
|
<Footer/>
|