ui: use enum state for spot ready checker

This commit is contained in:
nick-delirium 2024-09-12 17:47:43 +02:00
parent ea61f09f09
commit 62c0d07fe0
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -34,9 +34,7 @@ function SpotVideoContainer({
checkReady: () => Promise<boolean>;
}) {
const [prevIsProcessing, setPrevIsProcessing] = React.useState(false);
const [processingState, setProcessingState] = React.useState<ProcessingState>(
ProcessingState.Unchecked
);
const [processingState, setProcessingState] = React.useState<ProcessingState>(ProcessingState.Unchecked);
const [isLoaded, setLoaded] = React.useState(false);
const videoRef = React.useRef<HTMLVideoElement>(null);
const playbackTime = React.useRef(0);