This commit is contained in:
amy 2024-11-20 18:53:12 +03:30
parent 1f94464b3a
commit 7765c6af9f
No known key found for this signature in database
5 changed files with 8 additions and 24 deletions

View file

@ -2,31 +2,17 @@
import { onCleanup } from "solid-js";
import { removethething } from "./utils.tsx";
function getName(): string{
return Math.random() < 0.2? "EHCO" : "ECHO"
}
function HoverComponent() {
let timerId: number|null;
// const [name, setname] = createSignal(true)
// const startTimer = () => {
// timerId = setTimeout(() => {
// setname(!name())
// }, 3000);
// };
const clearTimer = () => {
if (timerId) {
clearTimeout(timerId);
timerId = null;
}
};
// const handleMouseEnter = () => {
// startTimer();
// };
onCleanup(() => {
clearTimer();
@ -40,10 +26,9 @@ function HoverComponent() {
if (e.target.textContent !== "ECHO") {
e.target.textContent = "ECHO"
}
}}
// onMouseLeave={clearTimer}
}}
>
{getName()}
Amy
</h1>
);
}