mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-11-10 01:59:54 +05:30
chore: remove unnecessary files
This commit is contained in:
parent
0f1956799c
commit
372cb95d14
4 changed files with 18 additions and 30 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
import { expect, describe, it } from 'vitest';
|
||||
// import { } from './service';
|
||||
//
|
||||
// describe('crop', () => {
|
||||
//
|
||||
// })
|
||||
Loading…
Add table
Add a link
Reference in a new issue