Skip to content

Commit

Permalink
Prevent duplicate recognize request after product discarded
Browse files Browse the repository at this point in the history
  • Loading branch information
pkirilin committed Oct 27, 2024
1 parent 457e86e commit d31ce82
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/frontend/src/features/addNote/model/addNoteSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const addNoteSlice = createSlice({
if (state.note) {
state.note.product = null;
delete state.product;
delete state.image;
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const SearchProductsOnImage: FC<Props> = ({ image }) => {
}, [image.base64, image.name, recognize]);

useEffect(() => {
// TODO: prevent duplicate request after product discarded
sendRecognizeRequest();
}, [sendRecognizeRequest]);

Expand Down

0 comments on commit d31ce82

Please sign in to comment.