e2corporation commented on code in PR #3496:
URL: 
https://github.com/apache/incubator-devlake/pull/3496#discussion_r1013010340


##########
config-ui/src/components/blueprints/create-workflow/DataScopes.jsx:
##########
@@ -67,22 +65,20 @@ const DataScopes = (props) => {
     cardStyle = {}
   } = props
 
-  const selectedBoards = useMemo(
-    () => boards[configuredConnection.id],
-    [boards, configuredConnection?.id]
+  const selectedScopeEntities = useMemo(
+    () => scopeEntitiesGroup[configuredConnection.id],
+    [scopeEntitiesGroup, configuredConnection?.id]
   )
-  const selectedProjects = useMemo(
-    () => projects[configuredConnection.id],
-    [projects, configuredConnection?.id]
-  )
-
-  useEffect(() => {
-    console.log('>> OVER HERE!!!', selectedBoards)
-  }, [selectedBoards])
 
-  useEffect(() => {
-    console.log('>> OVER HERE FOR Projects!!!', selectedProjects)
-  }, [selectedProjects])
+  const setScopeEntities = useCallback(
+    (scopeEntities) => {
+      setScopeEntitiesGroup((g) => ({
+        ...g,
+        [configuredConnection.id]: scopeEntities

Review Comment:
   Ok, this was another reason why I noted Index ID was important within the 
code comments when I setup the all provider connections map. I think it would 
be ideal to use a generated key like we do with transformations manager for 
improved consistency. As long as Connection **Index ID** with respect to the 
all connections list is being used this is ok for now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to