asb_cloud_front/src/pages/Main.jsx

34 lines
814 B
React
Raw Normal View History

import { Layout, } from 'antd'
2021-04-02 17:22:34 +05:00
import Wells from './Wells'
import PageHeader from './Header'
import Well from "../components/Well";
import {Redirect, Route, Switch} from "react-router-dom";
2021-04-02 17:22:34 +05:00
const { Content } = Layout
2021-04-02 17:22:34 +05:00
export default function Main(){
return(
<Content>
<PageHeader />
2021-04-02 17:22:34 +05:00
<Layout>
<Content className="site-layout-background sheet"
style={{ marginTop: '0',
paddingTop: '0'}}>
<Switch>
<Route path="/well/:id/">
<Well/>
</Route>
<Route path="/well">
<Wells/>
</Route>
<Route path="/">
<Redirect to={{pathname: `/well`}}/>
</Route>
</Switch>
2021-04-02 17:22:34 +05:00
</Content>
</Layout>
</Content>
2021-04-02 17:22:34 +05:00
);
}