Drop files here or click to browse
} + {children ||{ui.dropzone}
} ); } diff --git a/src/components/ui/EditInAnnotatorButton.tsx b/src/components/ui/EditInAnnotatorButton.tsx index e3d53c0..fd5424a 100644 --- a/src/components/ui/EditInAnnotatorButton.tsx +++ b/src/components/ui/EditInAnnotatorButton.tsx @@ -1,5 +1,6 @@ import { PenTool } from 'lucide-react'; import { sendImageToAnnotator } from '@/services/handoff'; +import { useUi } from '@/i18n/shared'; import { Button } from './Button'; interface EditInAnnotatorButtonProps { @@ -11,6 +12,7 @@ interface EditInAnnotatorButtonProps { /** Opens the Image Annotator pre-loaded with this image (via IndexedDB handoff). */ export function EditInAnnotatorButton({ blob, filename = 'image.png', disabled }: EditInAnnotatorButtonProps) { + const ui = useUi(); const handleClick = async () => { if (!blob) return; const resolved = typeof blob === 'function' ? await blob() : blob; @@ -20,7 +22,7 @@ export function EditInAnnotatorButton({ blob, filename = 'image.png', disabled } return ( ); } diff --git a/src/components/ui/ImageResult.tsx b/src/components/ui/ImageResult.tsx index 08823a8..3affaae 100644 --- a/src/components/ui/ImageResult.tsx +++ b/src/components/ui/ImageResult.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from 'react'; import { ResultActions } from './ResultActions'; +import { useUi } from '@/i18n/shared'; import { formatBytes } from '@/tools/image/canvas.lib'; interface ImageResultProps { @@ -11,6 +12,7 @@ interface ImageResultProps { /** Shows an image result: preview, output size (and % change), download. */ export function ImageResult({ blob, filename, originalSize }: ImageResultProps) { + const ui = useUi(); const [url, setUrl] = useState(''); useEffect(() => { @@ -25,7 +27,7 @@ export function ImageResult({ blob, filename, originalSize }: ImageResultProps) return (