asb_cloud_front/src/pages/Main.jsx

32 lines
721 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() {
2021-04-02 17:22:34 +05:00
return (
<Content>
<PageHeader/>
2021-04-02 17:22:34 +05:00
<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>
2021-04-02 17:22:34 +05:00
</Layout>
</Content>
)
2021-04-02 17:22:34 +05:00
}