2021-04-02 17:22:34 +05:00
|
|
|
import Wells from './Wells'
|
2021-05-25 12:02:39 +05:00
|
|
|
import Well from "../components/Well";
|
2021-05-31 15:02:35 +05:00
|
|
|
import LayoutPortal from './LayoutPortal'
|
2021-05-25 12:02:39 +05:00
|
|
|
import {Redirect, Route, Switch} from "react-router-dom";
|
2021-04-02 17:22:34 +05:00
|
|
|
|
2021-05-27 12:53:42 +05:00
|
|
|
export default function Main() {
|
2021-04-02 17:22:34 +05:00
|
|
|
|
2021-05-27 12:53:42 +05:00
|
|
|
return (
|
2021-05-31 15:02:35 +05:00
|
|
|
<Switch>
|
|
|
|
<Route path="/well/:id/">
|
|
|
|
<LayoutPortal>
|
|
|
|
<Well/>
|
|
|
|
</LayoutPortal>
|
|
|
|
</Route>
|
|
|
|
<Route path="/well">
|
|
|
|
<LayoutPortal>
|
|
|
|
<Wells/>
|
|
|
|
</LayoutPortal>
|
|
|
|
</Route>
|
|
|
|
<Route path="/">
|
|
|
|
<Redirect to={{pathname: `/well`}}/>
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
2021-05-27 12:53:42 +05:00
|
|
|
)
|
2021-04-02 17:22:34 +05:00
|
|
|
}
|