|
|
|
import React, { Component } from "react";
|
|
|
|
import { Route, Switch } from "react-router-dom";
|
|
|
|
|
|
|
|
import ForgotPassword from "./Auth/ForgotPassword";
|
|
|
|
import Login from "./Auth/Login";
|
|
|
|
import Register from "./Auth/Register";
|
|
|
|
import ResetPassword from "./Auth/ResetPassword";
|
|
|
|
import Settings from "./Auth/Settings";
|
|
|
|
import VerifyEmail from "./Auth/VerifyEmail";
|
|
|
|
import CreateWorkTypeForm from "./Worktype/CreateWorkTypeForm";
|
|
|
|
import UpdateWorkTypeForm from "./Worktype/UpdateWorkTypeForm";
|
|
|
|
import Worktypes from "./Worktype/Worktypes";
|
|
|
|
import ClientProviders from "./User/Client/ClientProviders";
|
|
|
|
import CreatePriceForm from "./User/Client/CreatePriceForm";
|
|
|
|
import UpdatePriceForm from "./User/Client/UpdatePriceForm";
|
|
|
|
import ClientAddProviderForm from "./User/Client/ClientAddProviderForm";
|
|
|
|
import ClientShifts from "./User/Client/ClientShifts";
|
|
|
|
import ClientAddShiftForm from "./User/Client/ClientAddShiftForm";
|
|
|
|
import ClientEditShiftForm from "./User/Client/ClientEditShiftForm";
|
|
|
|
import ProviderClients from "./User/Provider/ProviderClients";
|
|
|
|
import ProviderShift from "./User/Provider/ProviderShift";
|
|
|
|
import ProviderShifts from "./User/Provider/ProviderShifts";
|
|
|
|
import CompleteRegistration from "./User/CompleteRegistration";
|
|
|
|
import EditProfile from "./User/EditProfile";
|
|
|
|
import Profile from "./User/Profile";
|
|
|
|
import PrivateRoute from "./Shared/PrivateRoute";
|
|
|
|
import About from "./Static/About";
|
|
|
|
import Footer from "./Static/Footer";
|
|
|
|
import Home from "./Static/Home";
|
|
|
|
import NoMatch from "./Static/NoMatch";
|
|
|
|
import Navbar from "./Navbar";
|
|
|
|
|
|
|
|
class App extends Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Navbar />
|
|
|
|
<div
|
|
|
|
style={{
|
|
|
|
display: "flex",
|
|
|
|
minHeight: "calc(100vh - 1px)",
|
|
|
|
flexDirection: "column"
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<div style={{ flex: "1" }}>
|
|
|
|
<Switch>
|
|
|
|
<Route exact path="/" component={Home} />
|
|
|
|
<Route path="/about" component={About} />
|
|
|
|
<Route path="/auth/login" component={Login} />
|
|
|
|
<Route path="/auth/register" component={Register} />
|
|
|
|
<Route
|
|
|
|
path="/auth/verify-email/:emailKey"
|
|
|
|
component={VerifyEmail}
|
|
|
|
/>
|
|
|
|
<Route path="/auth/verify-email" component={VerifyEmail} />
|
|
|
|
<PrivateRoute path="/auth/settings" component={Settings} />
|
|
|
|
<Route path="/auth/forgot-password" component={ForgotPassword} />
|
|
|
|
<Route
|
|
|
|
path="/auth/reset-password/:uid/:token"
|
|
|
|
component={ResetPassword}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/worktypes"
|
|
|
|
component={Worktypes}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/update-worktype/:uuid"
|
|
|
|
component={UpdateWorkTypeForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/create-worktype"
|
|
|
|
component={CreateWorkTypeForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/providers/:providerUUID/update-price/:priceUUID"
|
|
|
|
component={UpdatePriceForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/providers/:providerUUID/create-price"
|
|
|
|
component={CreatePriceForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/providers"
|
|
|
|
component={ClientProviders}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/add-provider"
|
|
|
|
component={ClientAddProviderForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/shifts"
|
|
|
|
component={ClientShifts}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/add-shift"
|
|
|
|
component={ClientAddShiftForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/client/edit-shift/:shiftUUID"
|
|
|
|
component={ClientEditShiftForm}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/provider/clients"
|
|
|
|
component={ProviderClients}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/provider/shifts/:shiftUUID"
|
|
|
|
component={ProviderShift}
|
|
|
|
/>
|
|
|
|
<PrivateRoute
|
|
|
|
path="/user/profile/provider/shifts"
|
|
|
|
component={ProviderShifts}
|
|
|
|
/>
|
|
|
|
<PrivateRoute path="/user/profile/edit" component={EditProfile} />
|
|
|
|
<PrivateRoute path="/user/profile" component={Profile} />
|
|
|
|
<Route path="/user/complete-registration" component={Profile} />
|
|
|
|
<Route component={NoMatch} />
|
|
|
|
</Switch>
|
|
|
|
<Route
|
|
|
|
path="/user/complete-registration"
|
|
|
|
component={CompleteRegistration}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<Footer />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|