| 1 |
import React from "react"; |
| 2 |
import MenuHeader from "../components/MenuHeader"; |
| 3 |
import Content from "../components/Content"; |
| 4 |
import { useState } from "react"; |
| 5 |
// import UpsellModalSettingsMenu from '$Components/UpsellModalSettingsMenu'; |
| 6 |
|
| 7 |
/** |
| 8 |
* Container for admin menu. |
| 9 |
* |
| 10 |
* @return {JSX.Element} container component |
| 11 |
* @function Object() { [native code] } |
| 12 |
*/ |
| 13 |
function AdminMenuContainer() { |
| 14 |
const url = new URL(window.location.href); |
| 15 |
const route = url.searchParams.get("route"); |
| 16 |
|
| 17 |
const [currentRoutePath, setCurrentRoutePath] = useState( |
| 18 |
route ?? "welcome" |
| 19 |
); |
| 20 |
return ( |
| 21 |
<div className={"tableberg-admin-menu-container"}> |
| 22 |
{/* <UpsellModalSettingsMenu /> */} |
| 23 |
<MenuHeader |
| 24 |
currentRoutePath={currentRoutePath} |
| 25 |
setCurrentRoutePath={setCurrentRoutePath} |
| 26 |
/> |
| 27 |
<Content |
| 28 |
currentRoutePath={currentRoutePath} |
| 29 |
setCurrentRoutePath={setCurrentRoutePath} |
| 30 |
/> |
| 31 |
</div> |
| 32 |
); |
| 33 |
} |
| 34 |
|
| 35 |
/** |
| 36 |
* @module AdminMenuContainer |
| 37 |
*/ |
| 38 |
export default AdminMenuContainer; |
| 39 |
|