diff --git a/src/components/AudioOpener.tsx b/src/components/AudioOpener.tsx index 3557d3a..465197f 100644 --- a/src/components/AudioOpener.tsx +++ b/src/components/AudioOpener.tsx @@ -4,7 +4,6 @@ import genDownloadLink from "../functions/genDownloadLink" import { FileOpenerProps } from "../types/FileOpenerProps" const AudioOpener: React.FC = (props) => { - const audio = React.createRef() useEffect(()=>{ diff --git a/src/components/Breadcrum.tsx b/src/components/Breadcrum.tsx index 789d6c4..d12c175 100644 --- a/src/components/Breadcrum.tsx +++ b/src/components/Breadcrum.tsx @@ -1,5 +1,4 @@ import React from "react" -import PropTypes from "prop-types" import { ReactComponent as BreadcrumImage } from "./../assets/breadcrum.svg" interface Props{ @@ -19,6 +18,7 @@ const Breadcrum: React.FC = (props) => { Root + {parts.map((e,i,arr)=>{ const last = i == arr.length - 1 return
@@ -39,9 +39,4 @@ const Breadcrum: React.FC = (props) => { ) } -Breadcrum.propTypes = { - path: PropTypes.string.isRequired, - onDirClick: PropTypes.func -} - export default Breadcrum diff --git a/src/components/CreateDirButton.tsx b/src/components/CreateDirButton.tsx index 73e7e42..de51ec9 100644 --- a/src/components/CreateDirButton.tsx +++ b/src/components/CreateDirButton.tsx @@ -8,7 +8,6 @@ interface Props { } const CreateDirButton: React.FC = (props) => { - const [name,setName] = useState("") const [show,setShow] = useState(false) const input = useRef(null) @@ -37,6 +36,7 @@ const CreateDirButton: React.FC = (props) => { setName("") setShow(false) }}> + = (props) => { setName("") }} /> - {/* */}
diff --git a/src/components/DirectoryElement.tsx b/src/components/DirectoryElement.tsx index 7aaca56..593700a 100644 --- a/src/components/DirectoryElement.tsx +++ b/src/components/DirectoryElement.tsx @@ -1,5 +1,4 @@ import React from "react" -import PropTypes from "prop-types" import { Directory } from "../generated/graphql" import { MdFolderOpen } from "react-icons/md" @@ -21,8 +20,4 @@ const DirectoryElement: React.FC = (props) => { ) } -DirectoryElement.propTypes = { - dir: PropTypes.any.isRequired // TODO: maybe you can use the interface -} - -export default DirectoryElement \ No newline at end of file +export default DirectoryElement diff --git a/src/components/DragAndDrop.tsx b/src/components/DragAndDrop.tsx index c2f03d9..36baef3 100644 --- a/src/components/DragAndDrop.tsx +++ b/src/components/DragAndDrop.tsx @@ -45,7 +45,6 @@ const DragAndDrop: React.FC = (props) => { props.onDrop?.() if (event.dataTransfer?.files && event.dataTransfer.files.length > 0) { props.handleDrop?.(event.dataTransfer.files) - // event.dataTransfer.clearData() } } @@ -77,4 +76,4 @@ const DragAndDrop: React.FC = (props) => { ) } -export default DragAndDrop \ No newline at end of file +export default DragAndDrop diff --git a/src/components/FileBrowserContextMenu.tsx b/src/components/FileBrowserContextMenu.tsx index 573afdf..e7a31a2 100644 --- a/src/components/FileBrowserContextMenu.tsx +++ b/src/components/FileBrowserContextMenu.tsx @@ -20,7 +20,6 @@ interface Props { } const FileBrowserContextMenu: React.FC = (props) => { - function onClick({ props: itemProps, data }: ItemParams<{id:string}, Action>) { if (itemProps?.id && data != null){ props.onSelect?.(data,itemProps.id) diff --git a/src/components/FileBrowserElement.tsx b/src/components/FileBrowserElement.tsx index f10f7c6..f586108 100644 --- a/src/components/FileBrowserElement.tsx +++ b/src/components/FileBrowserElement.tsx @@ -1,12 +1,11 @@ import React from "react" -import PropTypes from "prop-types" import { Directory, File } from "../generated/graphql" import DirectoryComponent from "./DirectoryElement" import FileElement from "./FileElement" interface Props { - file?: File | null - dir?: Directory | null + file?: File + dir?: Directory onClick?: (event: React.MouseEvent ,data: File | Directory) => void onContextMenu?: (e:React.MouseEvent) => void } @@ -31,10 +30,4 @@ const FileBrowserElement: React.FC = (props) => { ) } -FileBrowserElement.propTypes = { - dir: PropTypes.any, - file: PropTypes.any, - onClick: PropTypes.func -} - -export default FileBrowserElement \ No newline at end of file +export default FileBrowserElement diff --git a/src/components/FileBrowserList.tsx b/src/components/FileBrowserList.tsx index c523811..cdb57f1 100644 --- a/src/components/FileBrowserList.tsx +++ b/src/components/FileBrowserList.tsx @@ -23,7 +23,7 @@ const FileBrowserList: React.FC = (props) => { { props.directorys.map(v => ({ props.onDirClick?.(e,dir.id) @@ -34,7 +34,7 @@ const FileBrowserList: React.FC = (props) => { />))} { props.files.map(v => ({ props.onFileClick?.(e,file.id) diff --git a/src/components/FileElement.tsx b/src/components/FileElement.tsx index 76e683f..4a6b13e 100644 --- a/src/components/FileElement.tsx +++ b/src/components/FileElement.tsx @@ -1,5 +1,4 @@ import React from "react" -import PropTypes from "prop-types" import { File } from "../generated/graphql" import sizeToReadable from "../functions/sizeToReadable" import dateFormat from "../functions/dateFomat" @@ -26,8 +25,4 @@ const FileElement: React.FC = (props) => { ) } -FileElement.propTypes = { - file: PropTypes.any.isRequired -} - export default FileElement diff --git a/src/components/FileOpen.tsx b/src/components/FileOpen.tsx index 0f9c420..db797bf 100644 --- a/src/components/FileOpen.tsx +++ b/src/components/FileOpen.tsx @@ -1,5 +1,4 @@ import React from "react" -import PropTypes from "prop-types" import { useGetFileQuery } from "../generated/graphql" import ImageOpener from "./ImageOpener" import TextOpener from "./TextOpener" @@ -13,7 +12,6 @@ interface Props { } const FileOpen: React.FC = (props) => { - if (!props.id) { return <> } @@ -66,10 +64,4 @@ const FileOpen: React.FC = (props) => { ) } -FileOpen.propTypes = { - id: PropTypes.string.isRequired, - show: PropTypes.bool.isRequired, - onCloseClick: PropTypes.func -} - export default FileOpen diff --git a/src/components/FileUploadButton.tsx b/src/components/FileUploadButton.tsx index 0c37b87..1727adc 100644 --- a/src/components/FileUploadButton.tsx +++ b/src/components/FileUploadButton.tsx @@ -7,7 +7,6 @@ interface Props { } const FileUploadButton: React.FC = (props) => { - const inputRef = useRef(null) return ( diff --git a/src/components/ImageOpener.tsx b/src/components/ImageOpener.tsx index 9541193..7a3841f 100644 --- a/src/components/ImageOpener.tsx +++ b/src/components/ImageOpener.tsx @@ -1,5 +1,4 @@ import React from "react" -import PropTypes from "prop-types" import genDownloadLink from "../functions/genDownloadLink" import { FileOpenerProps } from "../types/FileOpenerProps" @@ -9,8 +8,4 @@ const ImageOpener: React.FC = (props) => { ) } -ImageOpener.propTypes = { - file: PropTypes.any.isRequired -} - export default ImageOpener diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 4520b37..fdfd1d3 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -23,4 +23,4 @@ const Modal: React.FC = (props) => { ) } -export default Modal \ No newline at end of file +export default Modal diff --git a/src/components/TextOpener.tsx b/src/components/TextOpener.tsx index 02bc975..534838f 100644 --- a/src/components/TextOpener.tsx +++ b/src/components/TextOpener.tsx @@ -1,5 +1,4 @@ import React from "react" -import PropTypes from "prop-types" import { FileOpenerProps } from "../types/FileOpenerProps" import { useEffect } from "react" import { useState } from "react" @@ -23,8 +22,4 @@ const TextOpener: React.FC = (props) => { ) } -TextOpener.propTypes = { - file: PropTypes.any.isRequired, -} - export default TextOpener