mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
don't display empty fields
This commit is contained in:
parent
9792d402a8
commit
7a32866cc0
@ -216,7 +216,10 @@ function ObjectList(objects?: ObjectType[]) {
|
|||||||
<p className="text-sm mb-1.5 text-primary-variant">
|
<p className="text-sm mb-1.5 text-primary-variant">
|
||||||
Score
|
Score
|
||||||
</p>
|
</p>
|
||||||
{(obj.score * 100).toFixed(1).toString()}%
|
{obj.score
|
||||||
|
? (obj.score * 100).toFixed(1).toString()
|
||||||
|
: "-"}
|
||||||
|
%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mr-2 text-md w-1/3">
|
<div className="mr-2 text-md w-1/3">
|
||||||
@ -224,7 +227,7 @@ function ObjectList(objects?: ObjectType[]) {
|
|||||||
<p className="text-sm mb-1.5 text-primary-variant">
|
<p className="text-sm mb-1.5 text-primary-variant">
|
||||||
Ratio
|
Ratio
|
||||||
</p>
|
</p>
|
||||||
{obj.ratio.toFixed(2).toString()}
|
{obj.ratio ? obj.ratio.toFixed(2).toString() : "-"}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mr-2 text-md w-1/3">
|
<div className="mr-2 text-md w-1/3">
|
||||||
@ -232,7 +235,7 @@ function ObjectList(objects?: ObjectType[]) {
|
|||||||
<p className="text-sm mb-1.5 text-primary-variant">
|
<p className="text-sm mb-1.5 text-primary-variant">
|
||||||
Area
|
Area
|
||||||
</p>
|
</p>
|
||||||
{obj.area.toString()}
|
{obj.area ? obj.area.toString() : "-"}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ export function useCameraActivity(
|
|||||||
if (updatedCameraState) {
|
if (updatedCameraState) {
|
||||||
setObjects(updatedCameraState.objects);
|
setObjects(updatedCameraState.objects);
|
||||||
}
|
}
|
||||||
}, [updatedCameraState]);
|
}, [updatedCameraState, camera]);
|
||||||
|
|
||||||
// handle camera activity
|
// handle camera activity
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user