refactor a lot

This commit is contained in:
Seth 2025-05-04 20:47:19 -04:00
parent cf21a56d7a
commit deb223c642
27 changed files with 401 additions and 381 deletions

View file

@ -0,0 +1,17 @@
import { createRef } from "tsx-dom";
import socket from "../../Socket";
export default () => {
const paragraph = createRef<HTMLParagraphElement>();
socket.addEventListener('hyperate', (event: Event) => {
const heartRate = (event as CustomEvent).detail;
if (paragraph.current) {
paragraph.current.innerText = `${heartRate} BPM`;
}
});
return <div>
<p ref={paragraph}>0 BPM</p>
</div>;
}