Merge branch 'main' into link-bug-fix

This commit is contained in:
Vladimir Kirill Bickov
2025-05-27 03:02:18 -07:00
committed by GitHub
37 changed files with 1594 additions and 67 deletions

View File

@@ -101,11 +101,7 @@ const Navbar: React.FC<NavbarProps> = ({ onSwitchTheme }) => {
}}
>
<Link to="/">
<img
src={logo}
width={isMobile ? '80px' : '150px'}
style={{ pointerEvents: 'none' }}
/>
<img src={logo} width={isMobile ? '80px' : '150px'} />
</Link>
{isMobile ? (
<>

View File

@@ -33,18 +33,15 @@ export default function BaseFileInput({
const { showSnackBar } = useContext(CustomSnackBarContext);
useEffect(() => {
try {
if (isArray(value)) {
const objectUrl = createObjectURL(value[0]);
if (value) {
try {
const objectUrl = createObjectURL(value);
setPreview(objectUrl);
return () => revokeObjectURL(objectUrl);
} else {
setPreview(null);
} catch (error) {
console.error('Error previewing file:', error);
}
} catch (error) {
console.error('Error previewing file:', error);
}
} else setPreview(null);
}, [value]);
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
@@ -70,11 +67,6 @@ export default function BaseFileInput({
}
};
function handleClear() {
// @ts-ignore
onChange(null);
}
const handleDrop = (event: React.DragEvent<HTMLDivElement>) => {
event.preventDefault();
event.stopPropagation();
@@ -216,11 +208,7 @@ export default function BaseFileInput({
</Box>
)}
</Box>
<InputFooter
handleCopy={handleCopy}
handleImport={handleImportClick}
handleClear={handleClear}
/>
<InputFooter handleCopy={handleCopy} handleImport={handleImportClick} />
<input
ref={fileInputRef}
style={{ display: 'none' }}