diff --git a/frontend/src/app/signin/page.tsx b/frontend/src/app/signin/page.tsx index b84900e..050f581 100644 --- a/frontend/src/app/signin/page.tsx +++ b/frontend/src/app/signin/page.tsx @@ -67,8 +67,8 @@ export default function SignIn() { return (
- +
- +
(null); + +export const useCanvas = () => useContext(CanvasContext); + +export const CanvasProvider: React.FC<{ children: React.ReactNode }> = ({ + children, +}) => { + const canvasRef = useRef(null); + const [app, setApp] = useState(null); + + useEffect(() => { + if (canvasRef.current && !app) { + const newApp = new Application(canvasRef.current); + newApp.load( + "https://prod.spline.design/hnkOtrqss6sQ-wLy/scene.splinecode" + ); + setApp(newApp); + } + }, [canvasRef, app]); + + return ( + + + {children} + + ); +};