Spaces:
Running
Running
File size: 593 Bytes
72f0edb |
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 27 28 29 |
import React, { Suspense } from "react";
import Spline from "@splinetool/react-spline";
interface SplineViewerProps {
splineUrl: string;
className?: string;
}
const SplineViewer: React.FC<SplineViewerProps> = ({
splineUrl,
className = "",
}) => {
return (
<div className={`w-full ${className}`}>
<Suspense
fallback={
<div className="w-full h-full flex items-center justify-center">
Loading 3D model...
</div>
}
>
<Spline scene={splineUrl} />
</Suspense>
</div>
);
};
export default SplineViewer;
|