refactor(): Remove function, use it implicit

This commit is contained in:
Depickere Sven 2022-01-24 17:25:35 +01:00
parent d921df6f7c
commit bfa3b70644

View File

@ -23,12 +23,8 @@ const Button = styled.button`
} }
`; `;
function GetUseRef(): RefObject<HTMLInputElement> {
return useRef<HTMLInputElement>(null);
}
const FileInput = props => { const FileInput = props => {
const hiddenFileInput: RefObject<HTMLInputElement> = GetUseRef(); const hiddenFileInput: RefObject<HTMLInputElement> = useRef<HTMLInputElement>(null);
function handleClick() { function handleClick() {
if (hiddenFileInput && hiddenFileInput.current) { if (hiddenFileInput && hiddenFileInput.current) {