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

export default function Main() {
  return (
    <Switch>
      <Route path="/deposit">
        <LayoutPortal noSheet>
          <Deposit />
        </LayoutPortal>
      </Route>
      <Route path="/cluster/:idClaster/:tab?">
        <LayoutPortal>
          <Cluster />
        </LayoutPortal>
      </Route>
      <Route path="/well/:idWell/:tab?">
        <LayoutPortal>
          <Well />
        </LayoutPortal>
      </Route>
      <Route path="/">
        <Redirect to={{ pathname: `/deposit` }} />
      </Route>
    </Switch>
  );
}
