asb_cloud_front/src/pages/Documents/index.jsx

28 lines
688 B
React
Raw Normal View History

2021-08-17 10:46:28 +05:00
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]}>
2021-08-17 16:46:46 +05:00
{makeMenuItems(rootPath)}
2021-08-17 10:46:28 +05:00
</Menu>
<Layout>
<Content className="site-layout-background">
<Switch>
2021-08-17 16:46:46 +05:00
{makeRouteItems(rootPath, idWell)}
2021-08-17 10:46:28 +05:00
</Switch>
</Content>
</Layout>
</>)
}