This commit is contained in:
Hachi-R 2025-01-17 16:34:48 -03:00
parent b9c072e7ac
commit fe8f1b44db
2 changed files with 5 additions and 5 deletions

View File

@ -28,4 +28,4 @@
border-radius: 50%;
display: inline-flex;
align-self: center;
}
}

View File

@ -19,14 +19,14 @@ export default function Editor() {
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.ctrlKey && e.key === 's') {
if (e.ctrlKey && e.key === "s") {
e.preventDefault();
setCode(currentCode);
}
};
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, [currentCode]);
const handleEditorChange = (value: string | undefined) => {
@ -38,7 +38,7 @@ export default function Editor() {
<div className="editor-header">
<div className="editor-header-title">
<h1>CSS Editor</h1>
{!updated && <div className="editor-header-status"/>}
{!updated && <div className="editor-header-status" />}
</div>
</div>