movie-web/__old/controls/LoadingControl.tsx
2023-02-03 15:20:26 +01:00

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 />;
}