mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 18:12:25 -05:00
fix import file on click
This commit is contained in:
parent
5b2fe1f9a0
commit
97cfe7e243
1 changed files with 2 additions and 3 deletions
|
|
@ -71,8 +71,7 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
|
||||||
}, [exportResult]);
|
}, [exportResult]);
|
||||||
|
|
||||||
const importFileRef = useRef<HTMLInputElement>(null);
|
const importFileRef = useRef<HTMLInputElement>(null);
|
||||||
const importFileOnClick = (e) => {
|
const importFileOnClick = () => {
|
||||||
e.preventDefault();
|
|
||||||
importFileRef.current?.click();
|
importFileRef.current?.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -114,7 +113,7 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
importFileOnClick(e);
|
importFileOnClick();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
role="button"
|
role="button"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue