import { Layout, } from 'antd'
import Wells from './Wells'
import PageHeader from './Header'
import TelemetryView from "./TelemetryView";
import Well from "../components/Well";
import {Redirect, Route, Switch} from "react-router-dom";

const { Content } = Layout

export default function Main(){

  return(
    <Content>
      <PageHeader />
      <Layout>
        <Content className="site-layout-background sheet">
          <Switch>
            <Route path="/well/:id/">
              <Well/>
            </Route>
            <Route path="/well">
              <Wells/>
            </Route>
            <Route path="/">
              <Redirect to={{pathname: `/well`}}/>
            </Route>
          </Switch>
          </Content>
      </Layout>
    </Content>
  );
}
