Everything except Gang is Muified

This commit is contained in:
Olivier Gagnon
2021-10-01 13:36:59 -04:00
parent 4e8bb96f3f
commit 3187bb990d
10 changed files with 146 additions and 194 deletions
+7 -6
View File
@@ -1,9 +1,10 @@
import React from "react";
import React, { useState, useEffect } from "react";
export function BlinkingCursor(): React.ReactElement {
return (
<span style={{ fontSize: "1em" }} className={"blinking-cursor"}>
|
</span>
);
const [on, setOn] = useState(true);
useEffect(() => {
const i = setInterval(() => setOn((old) => !old), 1000);
return () => clearInterval(i);
});
return <>{on ? "|" : ""}</>;
}