mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-14 18:55:10 +01:00
13 lines
323 B
TypeScript
13 lines
323 B
TypeScript
import { Spinner } from "@/components/layout/Spinner";
|
|
import { useVideoPlayerState } from "../VideoContext";
|
|
|
|
export function LoadingControl() {
|
|
const { videoState } = useVideoPlayerState();
|
|
|
|
const isLoading = videoState.isFirstLoading || videoState.isLoading;
|
|
|
|
if (!isLoading) return null;
|
|
|
|
return <Spinner />;
|
|
}
|