diff --git a/addOns/webuipoc/src/main/pocs/reactWebUI/src/App.js b/addOns/webuipoc/src/main/pocs/reactWebUI/src/App.js
index 483f7a73bd5..93015fa2fb4 100644
--- a/addOns/webuipoc/src/main/pocs/reactWebUI/src/App.js
+++ b/addOns/webuipoc/src/main/pocs/reactWebUI/src/App.js
@@ -4,8 +4,8 @@ import Sidebar from "./Components/Sidebar/Sidebar";
import HeaderBase from "./Components/Header/HeaderBase";
import SideTree from "./Components/SitesTree/SitesTree";
import RequestBar from "./Components/Request-Response/Req-Resp-Bar";
-import { sendChildNode } from "./Utilities/requests";
import SearchBar from "./Components/SearchBar/SearchBar";
+import { NodeIDProvider } from "./Contexts/SitesTreeNodeIDContext";
const App = () => {
const [darkMode, setDarkMode] = useState(false);
@@ -20,6 +20,7 @@ const App = () => {
}, [darkMode]);
return (
+
@@ -35,19 +36,13 @@ const App = () => {
- {/* {childNode &&
- childNode.map((node) => (
-
- {node.hrefId}
-
- ))} */}
-
+
-
+
);
};
diff --git a/addOns/webuipoc/src/main/pocs/reactWebUI/src/Components/Accordion/AccordionData.jsx b/addOns/webuipoc/src/main/pocs/reactWebUI/src/Components/Accordion/AccordionData.jsx
index 303e932fe70..8d952716f0e 100644
--- a/addOns/webuipoc/src/main/pocs/reactWebUI/src/Components/Accordion/AccordionData.jsx
+++ b/addOns/webuipoc/src/main/pocs/reactWebUI/src/Components/Accordion/AccordionData.jsx
@@ -1,14 +1,17 @@
-import React, { useState } from "react";
+import React, { useState, useContext } from "react";
+import { nodeIDContext } from "../../Contexts/SitesTreeNodeIDContext";
const Accordion = ({ site, fetchChildren, isChild }) => {
const [isAccordionOpen, setAccordionOpen] = useState(false);
const [children, setChildren] = useState([])
+ const {setNodeID} = useContext(nodeIDContext)
const handleExpand = async () => {
+ setNodeID (site.hrefId)
if (isAccordionOpen == false && site.isLeaf == false) {
const childNodes = await fetchChildren(site.name)
setChildren(childNodes)
- }
+ }
setAccordionOpen(!isAccordionOpen);
}
const getDisplayName = (name) => {
@@ -23,9 +26,7 @@ const Accordion = ({ site, fetchChildren, isChild }) => {