From e54330f7c3db6d6540d9c54fed8f02643ccee3a3 Mon Sep 17 00:00:00 2001 From: salam dalloul Date: Thu, 18 Jan 2024 15:51:54 +0100 Subject: [PATCH] #22 connect settings panel with redux store --- .../NodeDetailView/settings/Settings.js | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/src/components/NodeDetailView/settings/Settings.js b/src/components/NodeDetailView/settings/Settings.js index b3d13ae..1969477 100644 --- a/src/components/NodeDetailView/settings/Settings.js +++ b/src/components/NodeDetailView/settings/Settings.js @@ -3,36 +3,44 @@ import SettingsGroup from "./SettingsGroup"; import FolderIcon from "@material-ui/icons/Folder"; import { useSelector, useDispatch } from 'react-redux' import { toggleSettingsPanelVisibility } from '../../../redux/actions'; +import React, {useEffect, useState} from "react"; +import {DragDropContext, Droppable} from "react-beautiful-dnd"; +import SettingsListItems from "./SettingsListItems"; const Settings = props => { const dispatch = useDispatch(); const showSettingsContent = useSelector(state => state.sdsState.settings_panel_visible); - + const metaDataPropertiesModel = useSelector(state => state.sdsState.metadata_model); + const [data, setData] = useState([]) const save = () => { dispatch(toggleSettingsPanelVisibility(!showSettingsContent)); }; + useEffect(() => { + setData(metaDataPropertiesModel) + }, [metaDataPropertiesModel]) return ( - - - - First List Title - - - - + {/**/} + {/* */} + {/* */} + {/* First List Title*/} + {/* */} + {/**/} + { + Object.keys(data).map(group => ) + }