import Wells from './Wells'
import Well from "../components/Well";
import LayoutPortal from './LayoutPortal'
import {Redirect, Route, Switch} from "react-router-dom";

export default function Main() {

  return (
    <Switch>
      <Route path="/well/:id/">
        <LayoutPortal>
          <Well/>
        </LayoutPortal>
      </Route>
      <Route path="/well">
        <LayoutPortal>
          <Wells/>
        </LayoutPortal>
      </Route>
      <Route path="/">
        <Redirect to={{pathname: `/well`}}/>
      </Route>
    </Switch>
  )
}
