From 673fa5e3e8e3a5576dc6b0f1edc09ecc2cdef831 Mon Sep 17 00:00:00 2001 From: Valimp Date: Tue, 8 Oct 2024 14:30:07 +0200 Subject: [PATCH 01/15] feat: add url to move images in env files --- .env.local | 1 + .env.preprod | 1 + .env.prod | 1 + 3 files changed, 3 insertions(+) diff --git a/.env.local b/.env.local index 605e5fd..7fe2469 100644 --- a/.env.local +++ b/.env.local @@ -10,6 +10,7 @@ VITE_API_URL = "http://localhost:8000/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.org" +VITE_PO_DELETE_IMAGES_URL = "http://world.openfoodfacts.net/cgi/product_image_move.pl" # PO Url for images # ------ diff --git a/.env.preprod b/.env.preprod index 820ff07..f473baa 100644 --- a/.env.preprod +++ b/.env.preprod @@ -10,6 +10,7 @@ VITE_API_URL = "https://nutripatrol.openfoodfacts.net/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.net" +VITE_PO_DELETE_IMAGES_URL = "http://world.openfoodfacts.net/cgi/product_image_move.pl" # PO Url for images # ------ diff --git a/.env.prod b/.env.prod index 3472c79..1fd3d6e 100644 --- a/.env.prod +++ b/.env.prod @@ -10,6 +10,7 @@ VITE_API_URL = "https://nutripatrol.openfoodfacts.org/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.org" +VITE_PO_DELETE_IMAGES_URL = "http://world.openfoodfacts.org/cgi/product_image_move.pl" # PO Url for images # ------ From 79cc60efd9fc760f493f7ede29b6acae1f1d2203 Mon Sep 17 00:00:00 2001 From: Valimp Date: Fri, 11 Oct 2024 09:33:01 +0200 Subject: [PATCH 02/15] fix: remove selected images from modal --- src/components/InfoModal.tsx | 82 ++++++++++++------------------------ 1 file changed, 27 insertions(+), 55 deletions(-) diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index e6dceff..a87a430 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -44,9 +44,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { return `${import.meta.env.VITE_PO_IMAGE_URL}/images/products/${part1}/${part2}/${part3}/${part4}/${imageId}.${def}.jpg`; } const handleTicketInfo = () => { - axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { - console.log(res.data.product); - + axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { const usedData: any = { name: res.data.product.product_name || null, barcode: res.data.code || null, @@ -139,6 +137,32 @@ export default function ModalInfo({barcode}: ModalInfoProps) { Barcode : {ticketInfo?.barcode} + + Images : + + {ticketInfo?.images ? ( + + + {Object.keys(ticketInfo.images).map((key) => ( + + + {key} + + + ))} + + + ) : ( + + No images found + + )} Brands : {ticketInfo?.brands} @@ -164,32 +188,6 @@ export default function ModalInfo({barcode}: ModalInfoProps) { )} - - Selected Images : - - {ticketInfo?.selectedImages ? ( - - - {ticketInfo.selectedImages.map((image: string, index: number) => ( - - - {index.toString()} - - - ))} - - - ) : ( - - No selected images found - - )} Ingredients : @@ -212,32 +210,6 @@ export default function ModalInfo({barcode}: ModalInfoProps) { )} - - Images : - - {ticketInfo?.images ? ( - - - {Object.keys(ticketInfo.images).map((key) => ( - - - {key} - - - ))} - - - ) : ( - - No images found - - )} } From e49772a24852a00429b04a903ad36ec165085314 Mon Sep 17 00:00:00 2001 From: Valimp Date: Mon, 21 Oct 2024 09:22:10 +0200 Subject: [PATCH 03/15] feat: create delete button with confirmation --- .env.local | 2 +- .env.preprod | 2 +- .env.prod | 2 +- src/components/DeleteButton.tsx | 40 +++++++++++++++++++++++++++++++++ src/components/InfoModal.tsx | 22 +++++++++--------- 5 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 src/components/DeleteButton.tsx diff --git a/.env.local b/.env.local index 7fe2469..cdf567e 100644 --- a/.env.local +++ b/.env.local @@ -10,7 +10,7 @@ VITE_API_URL = "http://localhost:8000/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.org" -VITE_PO_DELETE_IMAGES_URL = "http://world.openfoodfacts.net/cgi/product_image_move.pl" +VITE_PO_DELETE_IMAGES_URL = "https://world.openfoodfacts.net/cgi/product_image_move.pl" # PO Url for images # ------ diff --git a/.env.preprod b/.env.preprod index f473baa..d7ef63c 100644 --- a/.env.preprod +++ b/.env.preprod @@ -10,7 +10,7 @@ VITE_API_URL = "https://nutripatrol.openfoodfacts.net/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.net" -VITE_PO_DELETE_IMAGES_URL = "http://world.openfoodfacts.net/cgi/product_image_move.pl" +VITE_PO_DELETE_IMAGES_URL = "https://world.openfoodfacts.net/cgi/product_image_move.pl" # PO Url for images # ------ diff --git a/.env.prod b/.env.prod index 1fd3d6e..146a1e6 100644 --- a/.env.prod +++ b/.env.prod @@ -10,7 +10,7 @@ VITE_API_URL = "https://nutripatrol.openfoodfacts.org/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.org" -VITE_PO_DELETE_IMAGES_URL = "http://world.openfoodfacts.org/cgi/product_image_move.pl" +VITE_PO_DELETE_IMAGES_URL = "https://world.openfoodfacts.org/cgi/product_image_move.pl" # PO Url for images # ------ diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx new file mode 100644 index 0000000..28414ac --- /dev/null +++ b/src/components/DeleteButton.tsx @@ -0,0 +1,40 @@ +import IconButton from '@mui/material/IconButton'; +import DeleteIcon from '@mui/icons-material/Delete'; +import CheckIcon from '@mui/icons-material/Check'; +import { useState } from 'react'; +import axios from 'axios'; + +interface DeleteButtonProps { + barcode: string; + imgids: string; +} + +const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { + + const [isConfirmed, setIsConfirmed] = useState(false) + const deleteUrl = `${import.meta.env.VITE_PO_DELETE_IMAGES_URL}?code=${barcode}&imgids=${imgids}&move_to_override=trash` + + const handleDelete = () => { + if (!isConfirmed) { + setIsConfirmed(true) + } else { + try { + axios.delete(deleteUrl) + } catch (err) { + console.error(err) + } + } + } + + return ( + + { isConfirmed ? + + : + + } + + ) +} + +export default DeleteButton \ No newline at end of file diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index a87a430..64f8c44 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -10,6 +10,7 @@ import Accordion from '@mui/material/Accordion'; import AccordionSummary from '@mui/material/AccordionSummary'; import AccordionDetails from '@mui/material/AccordionDetails'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import DeleteButton from './DeleteButton'; const style = { position:'absolute', @@ -141,19 +142,20 @@ export default function ModalInfo({barcode}: ModalInfoProps) { Images : {ticketInfo?.images ? ( - + {Object.keys(ticketInfo.images).map((key) => ( - - {key} - + {key} + + + ))} From 853a2fc5f194c7e91d33be11380dae51061e1eb5 Mon Sep 17 00:00:00 2001 From: Valimp Date: Mon, 21 Oct 2024 13:56:32 +0200 Subject: [PATCH 04/15] fix: add labels to buttons --- .env.local | 2 +- src/components/DeleteButton.tsx | 23 +++++++++++++++++------ src/components/InfoModal.tsx | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.env.local b/.env.local index cdf567e..5238379 100644 --- a/.env.local +++ b/.env.local @@ -10,7 +10,7 @@ VITE_API_URL = "http://localhost:8000/api/v1" # PO Url # ------ VITE_PO_URL = "https://world.openfoodfacts.org" -VITE_PO_DELETE_IMAGES_URL = "https://world.openfoodfacts.net/cgi/product_image_move.pl" +VITE_PO_DELETE_IMAGES_URL = "https://world.openfoodfacts.localhost/cgi/product_image_move.pl" # PO Url for images # ------ diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 28414ac..1108e12 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -1,4 +1,4 @@ -import IconButton from '@mui/material/IconButton'; +import Button from '@mui/material/Button'; import DeleteIcon from '@mui/icons-material/Delete'; import CheckIcon from '@mui/icons-material/Check'; import { useState } from 'react'; @@ -27,13 +27,24 @@ const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { } return ( - + ) } diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index 64f8c44..e8a927d 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -145,7 +145,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { {Object.keys(ticketInfo.images).map((key) => ( - + {key} Date: Mon, 21 Oct 2024 16:06:06 +0200 Subject: [PATCH 05/15] fix: use x-www-urlencoded instead of json --- src/components/DeleteButton.tsx | 16 ++++++++++++++-- src/components/InfoModal.tsx | 20 ++++---------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 1108e12..0d0c365 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -2,7 +2,7 @@ import Button from '@mui/material/Button'; import DeleteIcon from '@mui/icons-material/Delete'; import CheckIcon from '@mui/icons-material/Check'; import { useState } from 'react'; -import axios from 'axios'; +import axios, { AxiosResponse } from 'axios'; interface DeleteButtonProps { barcode: string; @@ -18,8 +18,20 @@ const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { if (!isConfirmed) { setIsConfirmed(true) } else { + const data = new URLSearchParams() + data.append('code', barcode) + data.append('imgids', imgids) + data.append('move_to_override', 'trash') try { - axios.delete(deleteUrl) + axios.post( + deleteUrl, + data, + { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + } + ) } catch (err) { console.error(err) } diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index e8a927d..3caeac0 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -45,12 +45,12 @@ export default function ModalInfo({barcode}: ModalInfoProps) { return `${import.meta.env.VITE_PO_IMAGE_URL}/images/products/${part1}/${part2}/${part3}/${part4}/${imageId}.${def}.jpg`; } const handleTicketInfo = () => { - axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { + axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { + console.log(res.data) const usedData: any = { name: res.data.product.product_name || null, barcode: res.data.code || null, images: {}, - selectedImages: [], brands: res.data.product.brands || null, editors_tags: res.data.product.editors_tags || null, categories: [], @@ -66,19 +66,6 @@ export default function ModalInfo({barcode}: ModalInfoProps) { } }); } - // loop through the selected images and keep only the url - const selectedImages = res.data.product.selected_images; - if (selectedImages) { - for (const key in selectedImages) { - if (selectedImages[key].thumb ) { - for (const lang in selectedImages[key].thumb) { - if (selectedImages[key].thumb[lang]) { - usedData.selectedImages.push(selectedImages[key].thumb[lang]); - } - } - } - } - } // loop through the ingredients and keep only the text const ingredients = res.data.product.ingredients; if (ingredients) { @@ -97,6 +84,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { } } } + console.log(usedData) setTicketInfo(usedData); setIsLoaded(true); }).catch((err) => { @@ -154,7 +142,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { style={{objectFit: 'contain'}} /> - + ))} From 0b545327d2ae761712338f14ebc28ab3690b9550 Mon Sep 17 00:00:00 2001 From: Valimp Date: Tue, 22 Oct 2024 09:04:43 +0200 Subject: [PATCH 06/15] fix: remove logs --- src/components/DeleteButton.tsx | 2 +- src/components/InfoModal.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 0d0c365..818a0fe 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -2,7 +2,7 @@ import Button from '@mui/material/Button'; import DeleteIcon from '@mui/icons-material/Delete'; import CheckIcon from '@mui/icons-material/Check'; import { useState } from 'react'; -import axios, { AxiosResponse } from 'axios'; +import axios from 'axios'; interface DeleteButtonProps { barcode: string; diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index 3caeac0..4440d09 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -45,8 +45,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { return `${import.meta.env.VITE_PO_IMAGE_URL}/images/products/${part1}/${part2}/${part3}/${part4}/${imageId}.${def}.jpg`; } const handleTicketInfo = () => { - axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { - console.log(res.data) + axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { const usedData: any = { name: res.data.product.product_name || null, barcode: res.data.code || null, @@ -84,7 +83,6 @@ export default function ModalInfo({barcode}: ModalInfoProps) { } } } - console.log(usedData) setTicketInfo(usedData); setIsLoaded(true); }).catch((err) => { From 6d89e86e39cf2e28cf7e01a2a17dab810e02f586 Mon Sep 17 00:00:00 2001 From: Valimp Date: Tue, 22 Oct 2024 09:14:18 +0200 Subject: [PATCH 07/15] fix: give key in DeleteButton Props --- src/components/DeleteButton.tsx | 1 + src/components/InfoModal.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 818a0fe..8a5c38c 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -16,6 +16,7 @@ const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { const handleDelete = () => { if (!isConfirmed) { + console.log(imgids) setIsConfirmed(true) } else { const data = new URLSearchParams() diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index 4440d09..c7cc169 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -45,7 +45,8 @@ export default function ModalInfo({barcode}: ModalInfoProps) { return `${import.meta.env.VITE_PO_IMAGE_URL}/images/products/${part1}/${part2}/${part3}/${part4}/${imageId}.${def}.jpg`; } const handleTicketInfo = () => { - axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { + axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { + console.log(res.data) const usedData: any = { name: res.data.product.product_name || null, barcode: res.data.code || null, @@ -83,6 +84,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { } } } + console.log(usedData) setTicketInfo(usedData); setIsLoaded(true); }).catch((err) => { @@ -140,7 +142,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { style={{objectFit: 'contain'}} /> - + ))} From 899cde5fd5c38b7df003f7b967459b265615b12f Mon Sep 17 00:00:00 2001 From: Valimp Date: Tue, 22 Oct 2024 09:14:56 +0200 Subject: [PATCH 08/15] fix: remove logs --- src/components/DeleteButton.tsx | 1 - src/components/InfoModal.tsx | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 8a5c38c..818a0fe 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -16,7 +16,6 @@ const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { const handleDelete = () => { if (!isConfirmed) { - console.log(imgids) setIsConfirmed(true) } else { const data = new URLSearchParams() diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index c7cc169..854da46 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -45,8 +45,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { return `${import.meta.env.VITE_PO_IMAGE_URL}/images/products/${part1}/${part2}/${part3}/${part4}/${imageId}.${def}.jpg`; } const handleTicketInfo = () => { - axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { - console.log(res.data) + axios.get(`${import.meta.env.VITE_PO_URL}/api/v2/product/${barcode}.json`).then((res) => { const usedData: any = { name: res.data.product.product_name || null, barcode: res.data.code || null, @@ -84,7 +83,6 @@ export default function ModalInfo({barcode}: ModalInfoProps) { } } } - console.log(usedData) setTicketInfo(usedData); setIsLoaded(true); }).catch((err) => { From 81585eb5a1b9752374b74a708c7802140b091d40 Mon Sep 17 00:00:00 2001 From: Valimp Date: Tue, 22 Oct 2024 14:57:58 +0200 Subject: [PATCH 09/15] fix: change color of delete button to confirm --- src/components/DeleteButton.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 818a0fe..89b8162 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -41,7 +41,12 @@ const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { return ( ) From a0b0d58a912b1889f7871a7ed51f570375e57ad4 Mon Sep 17 00:00:00 2001 From: Valimp Date: Tue, 22 Oct 2024 15:24:32 +0200 Subject: [PATCH 11/15] feat: reload the modale after image delete --- src/components/DeleteButton.tsx | 4 +++- src/components/InfoModal.tsx | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 512e7f2..8732e55 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -8,9 +8,10 @@ import axios from 'axios'; interface DeleteButtonProps { barcode: string; imgids: string; + handleImageDeleted: () => void; } -const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { +const DeleteButton = ({ barcode, imgids, handleImageDeleted }: DeleteButtonProps) => { const [isConfirmed, setIsConfirmed] = useState(false) const [isLoading, setIsLoading] = useState(false) @@ -38,6 +39,7 @@ const DeleteButton = ({ barcode, imgids }: DeleteButtonProps) => { .then(response => { console.log(response) setIsLoading(false) + handleImageDeleted() }) } catch (err) { console.error(err) diff --git a/src/components/InfoModal.tsx b/src/components/InfoModal.tsx index 854da46..a5b6958 100644 --- a/src/components/InfoModal.tsx +++ b/src/components/InfoModal.tsx @@ -90,6 +90,9 @@ export default function ModalInfo({barcode}: ModalInfoProps) { setIsLoaded(true); }) } + const handleImageDeleted = () => { + handleTicketInfo(); + }; const handleOpen = () => { handleTicketInfo(); setOpen(true); @@ -140,7 +143,7 @@ export default function ModalInfo({barcode}: ModalInfoProps) { style={{objectFit: 'contain'}} /> - + ))} From d6c9e4c7324dc24ecfe4f1d783e4c65189113d83 Mon Sep 17 00:00:00 2001 From: Valimp Date: Wed, 23 Oct 2024 09:48:34 +0200 Subject: [PATCH 12/15] feat: add credentials to send cookies in the request --- src/components/DeleteButton.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 8732e55..3c597ca 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -4,6 +4,7 @@ import CheckIcon from '@mui/icons-material/Check'; import LoopIcon from '@mui/icons-material/Loop'; import { useState } from 'react'; import axios from 'axios'; +import off from '../off'; interface DeleteButtonProps { barcode: string; @@ -33,7 +34,8 @@ const DeleteButton = ({ barcode, imgids, handleImageDeleted }: DeleteButtonProps { headers: { 'Content-Type': 'application/x-www-form-urlencoded' - } + }, + withCredentials: true } ) .then(response => { From 3b27e7da7f4545485a5b2631551c6726e0551de1 Mon Sep 17 00:00:00 2001 From: Valimp Date: Wed, 23 Oct 2024 09:49:04 +0200 Subject: [PATCH 13/15] fix: remove unused import --- src/components/DeleteButton.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 3c597ca..5ad0ebf 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -4,7 +4,6 @@ import CheckIcon from '@mui/icons-material/Check'; import LoopIcon from '@mui/icons-material/Loop'; import { useState } from 'react'; import axios from 'axios'; -import off from '../off'; interface DeleteButtonProps { barcode: string; From 7fb002ff05184f605333242ae4be6989d41a4793 Mon Sep 17 00:00:00 2001 From: Valimp Date: Wed, 23 Oct 2024 09:55:19 +0200 Subject: [PATCH 14/15] fix: not changing color when loading --- src/components/DeleteButton.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/DeleteButton.tsx b/src/components/DeleteButton.tsx index 5ad0ebf..792ce0e 100644 --- a/src/components/DeleteButton.tsx +++ b/src/components/DeleteButton.tsx @@ -53,13 +53,10 @@ const DeleteButton = ({ barcode, imgids, handleImageDeleted }: DeleteButtonProps