17 lines
545 B
TypeScript
17 lines
545 B
TypeScript
"use client";
|
|
|
|
import { useAtomValue } from "jotai";
|
|
import { loadingAtom } from "@/store/jotai/loading";
|
|
|
|
export function LoadingOverlay({ force = false }: { force?: boolean }) {
|
|
const isLoading = useAtomValue(loadingAtom);
|
|
|
|
if (!force && !isLoading) return null;
|
|
|
|
return (
|
|
<div className="fixed inset-0 z-[9999] bg-black/60 flex items-center justify-center">
|
|
{/* 심플 로딩 인디케이터 */}
|
|
<div className="h-20 w-20 rounded-full border-10 border-white/45! border-t-white! animate-spin" />
|
|
</div>
|
|
);
|
|
} |