Skip to content

Commit d7522ab

Browse files
Merge pull request #474 from CedricProfessionnel/RemoveUnuseFile
Remove unuse files and fix if changed config (Feature Aws Part)
2 parents da83cd8 + dc55f3e commit d7522ab

File tree

7 files changed

+11
-557
lines changed

7 files changed

+11
-557
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"babel-eslint": "^10.1.0",
6565
"chroma-js": "^2.0.4",
6666
"concurrently": "^5.3.0",
67-
"cypress": "^6.4.0",
67+
"cypress": "^6.7.0",
6868
"cypress-file-upload": "^4.0.6",
6969
"cypress-image-snapshot": "^3.1.1",
7070
"cypress-terminal-report": "^2.4.0",

src/components/ImportFromCognitoS3Dialog/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import datasetManagerCognito from "udt-dataset-managers/dist/CognitoDatasetManag
77
import useAuth from "../../utils/auth-handlers/use-auth"
88
import setTypeOfFileToLoadAndDisable from "./set-type-of-file-to-load-and-disable"
99
import initConfigImport from "./init-config-import"
10-
import datasetHasChanged from "../../utils//dataset-helper/get-files-differences"
1110
import setUrl from "./set-url"
1211
import { setIn } from "seamless-immutable"
1312
import ExpandedRow from "./table-expanded-row"
@@ -43,14 +42,10 @@ export default ({ open, onClose, onAddSamples }) => {
4342
useEffect(() => {
4443
if (!open) return
4544
var configToSet = configImport
46-
4745
var hasChanged = false
48-
if (oldData === lastObjectRef.current) {
49-
const changes = datasetHasChanged(lastObjectRef.current, oldData)
50-
if (changes.interface.type || changes.samples) {
51-
configToSet = setTypeOfFileToLoadAndDisable(configToSet, oldData)
52-
hasChanged = true
53-
}
46+
if (JSON.stringify(oldData) !== JSON.stringify(lastObjectRef.current)) {
47+
configToSet = setTypeOfFileToLoadAndDisable(configToSet, oldData)
48+
hasChanged = true
5449
}
5550
if (
5651
importConfigIsReady(projectToFetch, configImport) !== configImport.isReady

src/utils/dataset-helper/get-files-differences.js

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)