chore: remove unnecessary files

This commit is contained in:
Ibrahima G. Coulibaly
2025-03-09 04:02:19 +00:00
parent 0f1956799c
commit 372cb95d14
4 changed files with 18 additions and 30 deletions

View File

@@ -80,15 +80,6 @@ export default function ToolFileInput({
}
};
const handlePaste = (event: ClipboardEvent) => {
const clipboardItems = event.clipboardData?.items ?? [];
const item = clipboardItems[0];
if (item && item.type.includes('image')) {
const file = item.getAsFile();
if (file) onChange(file);
}
};
useEffect(() => {
if (value) {
const objectUrl = URL.createObjectURL(value);
@@ -138,7 +129,6 @@ export default function ToolFileInput({
}
};
// Handle crop changes from react-image-crop
const handleCropChange = (newCrop: Crop) => {
setCrop(newCrop);
};
@@ -156,12 +146,20 @@ export default function ToolFileInput({
};
useEffect(() => {
const handlePaste = (event: ClipboardEvent) => {
const clipboardItems = event.clipboardData?.items ?? [];
const item = clipboardItems[0];
if (item && item.type.includes('image')) {
const file = item.getAsFile();
if (file) onChange(file);
}
};
window.addEventListener('paste', handlePaste);
return () => {
window.removeEventListener('paste', handlePaste);
};
}, [handlePaste]);
}, [onChange]);
return (
<Box>