fix: FIxed compile error
Server Deploy / deploy (push) Failing after 1m3s

This commit is contained in:
2026-07-24 11:06:57 +01:00
parent accf7493e9
commit 9cc9e68d90
+6 -5
View File
@@ -43,10 +43,11 @@ export function NetworkBackground() {
const canvasRef = useRef<HTMLCanvasElement | null>(null);
useEffect(() => {
const canvas = canvasRef.current;
const canvas: HTMLCanvasElement | null = canvasRef.current;
if (!canvas) return;
const ctx = canvas.getContext("2d");
if (!ctx) return;
const cvs: HTMLCanvasElement = canvas;
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -138,10 +139,10 @@ export function NetworkBackground() {
dpr = Math.min(window.devicePixelRatio || 1, 2);
width = window.innerWidth;
height = window.innerHeight;
canvas.width = Math.floor(width * dpr);
canvas.height = Math.floor(height * dpr);
canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
cvs.width = Math.floor(width * dpr);
cvs.height = Math.floor(height * dpr);
cvs.style.width = `${width}px`;
cvs.style.height = `${height}px`;
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
build();
}