1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:01:19 -04:00

fix unnecessary re-rendering of ThemeToggle

This commit is contained in:
2022-06-14 13:00:11 -04:00
parent 2700f32054
commit 091ff73ab6
2 changed files with 9 additions and 6 deletions

View File

@@ -4,6 +4,9 @@ import RFB from "@novnc/novnc/core/rfb.js";
import Terminal from "../Terminal";
import { styled } from "../../lib/styles/stitches.config";
// types for @novnc/novnc are defined manually in ../../types/rfb.d.ts:
import type NoVncClient from "@novnc/novnc/core/rfb.js";
const Display = styled(
"div",
{
@@ -54,7 +57,7 @@ const VNC = ({ server }: VNCProps) => {
const [message, setMessage] = useState({ message: "", anyKey: false });
// the actual connection and virtual screen (injected by noVNC when it's ready)
const rfbRef = useRef<RFB>();
const rfbRef = useRef<NoVncClient>();
const screenRef = useRef<HTMLDivElement>(null);
// ends the session forcefully