mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-17 16:44:29 +03:00
use swr loading state
This commit is contained in:
parent
a4d91a1e71
commit
e66cfbce99
@ -687,7 +687,7 @@ function Timeline({
|
||||
|
||||
// motion data
|
||||
|
||||
const { data: motionData } = useSWR<MotionData[]>([
|
||||
const { data: motionData, isLoading } = useSWR<MotionData[]>([
|
||||
"review/activity/motion",
|
||||
{
|
||||
before: timeRange.before,
|
||||
@ -725,7 +725,7 @@ function Timeline({
|
||||
<div className="pointer-events-none absolute inset-x-0 top-0 z-20 h-[30px] w-full bg-gradient-to-b from-secondary to-transparent"></div>
|
||||
<div className="pointer-events-none absolute inset-x-0 bottom-0 z-20 h-[30px] w-full bg-gradient-to-t from-secondary to-transparent"></div>
|
||||
{timelineType == "timeline" ? (
|
||||
motionData ? (
|
||||
!isLoading ? (
|
||||
<MotionReviewTimeline
|
||||
segmentDuration={zoomSettings.segmentDuration}
|
||||
timestampSpread={zoomSettings.timestampSpread}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user