fix: update errors

This commit is contained in:
TrèsAbhi committed 2025-09-27 16:07:45 -05:00
1 parent 4ff9a2ec7f
commit c14efe86cc
34 files changed
+217 -280

No files matched your search

@@ -1,20 +1,20 @@
import { Canvas, type CanvasProps } from '@react-three/fiber';
import { forwardRef, useImperativeHandle, useRef } from 'react';
import { useOnScreen } from '../hooks/useOnScreen';
import { Canvas, type CanvasProps } from "@react-three/fiber";
import { forwardRef, useImperativeHandle, useRef } from "react";
import { useOnScreen } from "../hooks/useOnScreen";
export const SmartCanvas = forwardRef<HTMLCanvasElement, CanvasProps>(
(props, ref) => {
const canvas = useRef<HTMLCanvasElement>(null);
const canvas = useRef<HTMLCanvasElement>(null!);
const onScreen = useOnScreen(canvas);
useImperativeHandle(ref, () => canvas.current!, []);
return (
<Canvas
frameloop={onScreen ? 'demand' : 'never'}
frameloop={onScreen ? "demand" : "never"}
ref={canvas}
{...props}
/>
);
},
}
);