forked from VinokurovVE/tests
Minor fixes
This commit is contained in:
@ -22,6 +22,7 @@ interface DocumentProps {
|
||||
const FileItemStyle: SxProps = {
|
||||
cursor: 'pointer',
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
flexDirection: 'row',
|
||||
gap: '8px',
|
||||
alignItems: 'center',
|
||||
@ -46,16 +47,25 @@ function ItemFolder({ folder, index, handleFolderClick, ...props }: FolderProps)
|
||||
|
||||
function ItemDocument({ doc, index, handleDocumentClick, ...props }: DocumentProps) {
|
||||
return (
|
||||
<ListItemButton
|
||||
onClick={() => handleDocumentClick(doc, index)}
|
||||
>
|
||||
<ListItemButton>
|
||||
<Box
|
||||
sx={FileItemStyle}
|
||||
onClick={() => handleDocumentClick(doc, index)}
|
||||
{...props}
|
||||
>
|
||||
<InsertDriveFile />
|
||||
{doc.name}
|
||||
</Box>
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={() => {
|
||||
console.log("TODO: save")
|
||||
}}
|
||||
sx={{ ml: 'auto' }}
|
||||
>
|
||||
<Download />
|
||||
</IconButton>
|
||||
</Box>
|
||||
</ListItemButton>
|
||||
)
|
||||
}
|
||||
@ -125,7 +135,7 @@ export default function FolderViewer() {
|
||||
formData.append('files', file)
|
||||
}
|
||||
try {
|
||||
// const response = await DocumentService.uploadFiles(currentFolder.id, formData, setUploadProgress);
|
||||
const response = await DocumentService.uploadFiles(currentFolder.id, formData, setUploadProgress);
|
||||
setIsUploading(false);
|
||||
setFilesToUpload([]);
|
||||
mutate(`/info/documents/${currentFolder.id}`);
|
||||
|
Reference in New Issue
Block a user