import React from "react";
import { Router, Route, Switch } from "react-router-dom";
import { Provider } from "react-redux";
import "reset-css";

import history from "./history";
import { store } from "./store/store";
import Login from "./signIn/signIn";
import Register from "./signUp/signUp";
import putPassword from "./putPassword/putPassword";
import MyProfile from "./myProfile/myProfile";

const App = (props) => {
  return (
    <Provider store={store}>
      <Router history={history}>
        <Switch>
          <div className="wrapper">
            <Route exact path={["/", "/sign_in"]} component={Login} />
            <Route exact path="/sign_up" component={Register} />
            <Route exact path="/put_password" component={putPassword} />
            <Route exact path="/my_profile" component={MyProfile} />
          </div>
        </Switch>
      </Router>
    </Provider>
  );
};

export default App;
