From 92c0249534e4131a270eb74d009350bb613f3d4d Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Thu, 10 Jul 2025 15:30:45 +0100 Subject: [PATCH] refactor: PDF editor --- src/pages/tools/pdf/editor/index.tsx | 37 +++------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/src/pages/tools/pdf/editor/index.tsx b/src/pages/tools/pdf/editor/index.tsx index aafba85..d1dbcfc 100644 --- a/src/pages/tools/pdf/editor/index.tsx +++ b/src/pages/tools/pdf/editor/index.tsx @@ -6,45 +6,16 @@ import { ToolComponentProps } from '@tools/defineTool'; import { EmbedPDF } from '@simplepdf/react-embed-pdf'; export default function PdfEditor({ title }: ToolComponentProps) { - const [input, setInput] = useState(null); - const [pdfUrl, setPdfUrl] = useState(null); - - const onFileChange = (file: File | null) => { - if (file) { - setInput(file); - const url = URL.createObjectURL(file); - setPdfUrl(url); - } else { - setInput(null); - setPdfUrl(null); - } - }; - return ( - {pdfUrl ? ( - - - - ) : ( - - )} - + + + } toolInfo={{ title: 'PDF Editor',