fix(image-annotator): move canvas proxy helper inside component
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-03-05 16:40:52 +08:00
parent 20cb4f0149
commit 46ce28adad

View File

@ -108,6 +108,9 @@ export function ImageAnnotator({
const [mounted, setMounted] = useState(false);
const fileInputRef = useRef<HTMLInputElement>(null);
const toCanvasLoadUrl = useCallback((url: string) => {
return buildImageProxyUrl(url);
}, []);
// Handle open change
const handleOpenChange = (newOpen: boolean) => {
@ -1986,6 +1989,3 @@ export function ImageAnnotator({
</Dialog>
);
}
const toCanvasLoadUrl = useCallback((url: string) => {
return buildImageProxyUrl(url);
}, []);