Skip to content

Commit

Permalink
fix: Merge pull request #456 from UniversalDataTool/fix/import-coco
Browse files Browse the repository at this point in the history
fix import from coco
  • Loading branch information
seveibar authored Feb 24, 2021
2 parents ca2173a + c050653 commit db1de07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
16 changes: 2 additions & 14 deletions src/components/ImportFromCOCODialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import FormGroup from "@material-ui/core/FormGroup"
import Box from "@material-ui/core/Box"
import FormControlLabel from "@material-ui/core/FormControlLabel"
import Checkbox from "@material-ui/core/Checkbox"
import { setIn } from "seamless-immutable"

const Image = styled("img")({
width: 100,
Expand All @@ -25,12 +24,7 @@ const TermsOfUse = styled("div")({
},
})

export const ImportFromCOCODialog = ({
open,
onClose,
onChangeDataset,
dataset,
}) => {
export const ImportFromCOCODialog = ({ open, onClose, onAddSamples }) => {
const [labelsSelected, setLabelsSelected] = useState([])
const [exclusive, setExclusive] = useState()
const [shouldReplaceInterface, setShouldReplaceInterface] = useState()
Expand Down Expand Up @@ -59,13 +53,7 @@ export const ImportFromCOCODialog = ({
text: "Add Samples",
disabled: !importedDataset,
onClick: () => {
onChangeDataset(
setIn(
dataset,
["samples"],
dataset.samples.concat(importedDataset.samples)
).setIn(["interface"], importedDataset.interface)
)
onAddSamples(importedDataset.samples)
onClose()
},
},
Expand Down
3 changes: 1 addition & 2 deletions src/components/ImportPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ export default ({ isDesktop, authConfig, user }) => {
<ImportFromCOCODialog
open={selectedDialog === "import-from-coco"}
onClose={closeDialog}
// dataset={dataset}
// onChangeDataset={onChangeDataset}
onAddSamples={onAddSamples}
/>
) : selectedDialog === "import-text-snippets" ? (
<ImportTextSnippetsDialog
Expand Down

0 comments on commit db1de07

Please sign in to comment.