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


##########
config-ui/src/components/blueprints/create-workflow/DataTransformations.jsx:
##########
@@ -136,17 +109,47 @@ const DataTransformations = (props) => {
   )
   const [activeEntity, setActiveEntity] = useState()
 
-  const transformationHasChanged = useCallback(
+  const checkCurrentTransformationIsChanged = useCallback(
     (item) => {
-      const initializeTransform = initializeTransformations[item?.id]
-      const storedTransform = transformations[item?.id]
-      return (
-        initializeTransform &&
-        storedTransform &&
-        !isEqual(initializeTransform, storedTransform)
+      return checkTransformationIsChanged(
+        configuredConnection?.provider,
+        configuredConnection?.id,
+        item
       )
     },
-    [initializeTransformations, transformations]
+    [
+      configuredConnection?.provider,
+      configuredConnection?.id,
+      checkTransformationIsChanged
+    ]
+  )
+
+  const changeCurrentTransformationSettings = useCallback(
+    (settings) => {

Review Comment:
   Is looks like we assume Board, then default to Project. It possible to make 
this more declarative?
   
   ```suggestion
       (settings) => {
           console.log(configuredBoard || configuredProject)
           return changeTransformationSettings(
             configuredConnection?.provider,
             configuredConnection?.id,
             configuredBoard || configuredProject,
             settings
           )
        }
   ```



-- 
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