From c1fe6c513b87a5d2f47e8c762594e46b19d9f654 Mon Sep 17 00:00:00 2001 From: jona42-ui Date: Tue, 15 Aug 2023 06:59:18 +0300 Subject: [PATCH] fix build error --- src/draw-page.component.tsx | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/draw-page.component.tsx b/src/draw-page.component.tsx index e32802e..2cbe5a1 100644 --- a/src/draw-page.component.tsx +++ b/src/draw-page.component.tsx @@ -8,15 +8,13 @@ import { useParams } from 'react-router-dom'; import html2canvas from "html2canvas"; const DrawPage: React.FC = () => { - const [selectedImage] = useState(null); + const { patientUuid } = useParams(); useTranslation(); - const [activeImage, setActiveImage] = useState(null); + const [activeImage] = useState(null); const drawingWidgetRef = useRef(null); - const handleSaveAnnotations = async (annotations: ImageData[]) => { - // Serialize the annotations to SVG - const serializedSvg = annotationsToSVG(annotations); + const handleSaveAnnotations = async () => { // Convert SVG to PNG using html2canvas if (drawingWidgetRef.current) { @@ -45,19 +43,6 @@ const DrawPage: React.FC = () => { // Display the serialized SVG or PNG. }; - const annotationsToSVG = (annotations: ImageData[]) => { - // using the first region's x, y, width, and height - const firstRegion = annotations[0]?.regions[0]; - if (firstRegion) { - const { x, y } = firstRegion; - const width = 100; - const height = 50; - return ``; - } - - // Return an empty SVG if no annotations are available - return ""; - }; return (