mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
lint
This commit is contained in:
parent
b9c072e7ac
commit
fe8f1b44db
@ -19,14 +19,14 @@ export default function Editor() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleKeyDown = (e: KeyboardEvent) => {
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
if (e.ctrlKey && e.key === 's') {
|
if (e.ctrlKey && e.key === "s") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setCode(currentCode);
|
setCode(currentCode);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener("keydown", handleKeyDown);
|
||||||
return () => window.removeEventListener('keydown', handleKeyDown);
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
||||||
}, [currentCode]);
|
}, [currentCode]);
|
||||||
|
|
||||||
const handleEditorChange = (value: string | undefined) => {
|
const handleEditorChange = (value: string | undefined) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user