Feat: auth 관련페이지 header 적용
This commit is contained in:
29
features/home/components/spline-scene.tsx
Normal file
29
features/home/components/spline-scene.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
"use client";
|
||||
|
||||
import Spline from "@splinetool/react-spline";
|
||||
import { useState } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface SplineSceneProps {
|
||||
sceneUrl: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function SplineScene({ sceneUrl, className }: SplineSceneProps) {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
return (
|
||||
<div className={cn("relative h-full w-full", className)}>
|
||||
{isLoading && (
|
||||
<div className="absolute inset-0 flex items-center justify-center bg-zinc-100 dark:bg-zinc-900">
|
||||
<div className="h-10 w-10 animate-spin rounded-full border-4 border-zinc-200 border-t-indigo-500 dark:border-zinc-800" />
|
||||
</div>
|
||||
)}
|
||||
<Spline
|
||||
scene={sceneUrl}
|
||||
onLoad={() => setIsLoading(false)}
|
||||
className="h-full w-full"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user