mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
Fix showing loading indicator when first loading a camera without previews (#12064)
This commit is contained in:
parent
c72d304515
commit
d01457e64d
@ -172,6 +172,12 @@ function PreviewVideoPlayer({
|
||||
|
||||
const [firstLoad, setFirstLoad] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
if (cameraPreviews && cameraPreviews.length > 0) {
|
||||
setFirstLoad(false);
|
||||
}
|
||||
}, [cameraPreviews]);
|
||||
|
||||
const [currentPreview, setCurrentPreview] = useState(initialPreview);
|
||||
|
||||
const onPreviewSeeked = useCallback(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user