mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
Don't require events
This commit is contained in:
parent
fd98449479
commit
dc347a2135
@ -502,19 +502,16 @@ function TrainingGrid({
|
||||
{Object.entries(faceGroups).map(([key, group]) => {
|
||||
const event = events.find((ev) => ev.id == key);
|
||||
|
||||
if (!event) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2 rounded-lg bg-card p-2">
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="capitalize">
|
||||
{event.label}:
|
||||
{event.sub_label
|
||||
Person:
|
||||
{event && event?.sub_label
|
||||
? ` ${event.sub_label} (${Math.round((event.data.sub_label_score || 0) * 100)}%)`
|
||||
: " Unknown"}
|
||||
</div>
|
||||
{event && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<div
|
||||
@ -534,6 +531,7 @@ function TrainingGrid({
|
||||
</TooltipContent>
|
||||
</TooltipPortal>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex flex-row flex-wrap gap-2">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user