-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.tsx
More file actions
26 lines (22 loc) · 896 Bytes
/
page.tsx
File metadata and controls
26 lines (22 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"use client";
import { useRef } from "react";
import { Application as SplineApplication } from "@splinetool/runtime";
import { CircularProgress } from "@mui/material";
import { useSplineState } from "@/lib/state/spline";
import { PenToolSpline } from "@/components/PenToolSpline";
export default function Home() {
const splineRef = useRef<SplineApplication | null>(null);
const splineState = useSplineState();
return (
<main className="bg-[#e3efff] size-full mobile-full overflow-hidden">
<div className="absolute size-full mobile-full flex justify-center items-center">
{!splineState.isPenToolSplineLoaded && (
<div className="flex justify-center items-center w-full h-full bg-black">
<CircularProgress className="text-white" size={64} />
</div>
)}
</div>
<PenToolSpline splineRef={splineRef} />
</main>
);
}