mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-06 05:10:20 +03:00
refactor(): Remove function, use it implicit
This commit is contained in:
parent
d921df6f7c
commit
bfa3b70644
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user