Fix linter issues
This commit is contained in:
parent
b30854feea
commit
a5609d2ebd
@ -33,7 +33,7 @@ function UploadedFileWidgetInner(p: {
|
||||
<FileViewerDialog
|
||||
open={open}
|
||||
file={p.file}
|
||||
onClose={() => setOpen(false)}
|
||||
onClose={() => { setOpen(false); }}
|
||||
/>
|
||||
<Button
|
||||
startIcon={
|
||||
@ -43,7 +43,7 @@ function UploadedFileWidgetInner(p: {
|
||||
<ImageIcon />
|
||||
)
|
||||
}
|
||||
onClick={() => setOpen(true)}
|
||||
onClick={() => { setOpen(true); }}
|
||||
>
|
||||
{p.file.file_name} ({filesize(p.file.file_size)})
|
||||
</Button>
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Button, IconButton, Tooltip, Typography } from "@mui/material";
|
||||
import UploadFileIcon from "@mui/icons-material/UploadFile";
|
||||
import { ServerApi } from "../../api/ServerApi";
|
||||
import { Button, Tooltip, Typography } from "@mui/material";
|
||||
import React from "react";
|
||||
import { FileApi, UploadedFile } from "../../api/FileApi";
|
||||
import { ServerApi } from "../../api/ServerApi";
|
||||
import { useAlert } from "../../hooks/context_providers/AlertDialogProvider";
|
||||
import { useLoadingMessage } from "../../hooks/context_providers/LoadingMessageProvider";
|
||||
import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider";
|
||||
@ -58,7 +58,7 @@ export function UploadFileButton(p: {
|
||||
const handlefileChange = (ev: React.ChangeEvent) => {
|
||||
ev.preventDefault();
|
||||
if ((fileInput.current?.files?.length ?? 0) > 0) {
|
||||
handleUpload([...fileInput.current?.files!]);
|
||||
handleUpload([...fileInput.current!.files!]);
|
||||
}
|
||||
};
|
||||
|
||||
@ -66,7 +66,9 @@ export function UploadFileButton(p: {
|
||||
<Tooltip
|
||||
title={p.tooltip}
|
||||
onDrop={handleDrop}
|
||||
onDragOver={(event) => event.preventDefault()}
|
||||
onDragOver={(event) => {
|
||||
event.preventDefault();
|
||||
}}
|
||||
onDragEnter={dragEnter}
|
||||
onDragLeave={dragLeave}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user