forked from ddrilling/asb_cloud_front
28 lines
735 B
React
28 lines
735 B
React
|
import {Layout, Menu} from "antd";
|
||
|
import {Switch, useParams} from "react-router-dom";
|
||
|
import {makeMenuItems, makeRouteItems} from './menuItems'
|
||
|
|
||
|
const { Content } = Layout
|
||
|
|
||
|
export default function MenuDocuments({idWell}) {
|
||
|
let {category} = useParams()
|
||
|
const rootPath = `/well/${idWell}`
|
||
|
|
||
|
return(<>
|
||
|
<Menu
|
||
|
mode="horizontal"
|
||
|
selectable={true}
|
||
|
className="well_menu"
|
||
|
selectedKeys={[category]}>
|
||
|
{makeMenuItems('documentsPageMenu', rootPath)}
|
||
|
</Menu>
|
||
|
<Layout>
|
||
|
<Content className="site-layout-background">
|
||
|
<Switch>
|
||
|
{makeRouteItems('documentsPageMenu', `${rootPath}`, idWell)}
|
||
|
</Switch>
|
||
|
</Content>
|
||
|
</Layout>
|
||
|
</>)
|
||
|
}
|