diff --git a/src/people/widgetViews/WorkspaceMission.tsx b/src/people/widgetViews/WorkspaceMission.tsx index d1235762..e660d204 100644 --- a/src/people/widgetViews/WorkspaceMission.tsx +++ b/src/people/widgetViews/WorkspaceMission.tsx @@ -255,9 +255,13 @@ const WorkspaceMission = () => { const [users, setUsers] = useState([]); const [displayUserRepoOptions, setDisplayUserRepoOptions] = useState>({}); const [codeGraphModal, setCodeGraphModal] = useState(false); - const [codeGraph, setCodeGraph] = useState(null); + const [codeGraph, setCodeGraph] = useState(null); const [codeGraphModalType, setCodeGraphModalType] = useState<'add' | 'edit'>('add'); const [currentCodeGraphUuid, setCurrentCodeGraphUuid] = useState(''); + const [selectedCodeGraph, setSelectedCodeGraph] = useState<{ + name: string; + url: string; + }>(); const fetchCodeGraph = useCallback(async () => { try { @@ -274,6 +278,12 @@ const WorkspaceMission = () => { const openCodeGraphModal = (type: 'add' | 'edit', graph?: CodeGraph) => { if (type === 'edit' && graph) { + if (graph) { + setSelectedCodeGraph({ + name: graph.name, + url: graph.url + }); + } setCurrentCodeGraphUuid(graph.uuid); } else { setCurrentCodeGraphUuid(''); @@ -283,6 +293,11 @@ const WorkspaceMission = () => { }; const closeCodeGraphModal = () => { + setSelectedCodeGraph({ + name: '', + url: '' + }); + setCurrentCodeGraphUuid(''); setCodeGraphModal(false); }; @@ -811,62 +826,70 @@ const WorkspaceMission = () => { - {!codeGraph && ( -