Skip to content

Commit

Permalink
feat: Allow to remove some logos from deep search (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Aug 12, 2023
1 parent 051ff69 commit 497d547
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/pages/logos/LogoDeepSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ export default function LogoSearch() {
);
};

const removeSelectedLogos = () => {
setLogosToAnnotate((prev) => prev.filter((logo, index) => !logo.selected));
};

const [isAnnotationOpen, setIsAnnotationOpen] = React.useState(false);
const openAnnotation = React.useCallback(() => {
setIsAnnotationOpen(true);
Expand Down Expand Up @@ -383,6 +387,14 @@ export default function LogoSearch() {
>
prev
</Button>
<Button
fullWidth
onClick={removeSelectedLogos}
color="error"
variant="contained"
>
Remove
</Button>
<Button
fullWidth
onClick={openAnnotation}
Expand Down

0 comments on commit 497d547

Please sign in to comment.