Don't require events

This commit is contained in:
Nicolas Mowen 2025-03-27 17:38:16 -06:00
parent fd98449479
commit dc347a2135

View File

@ -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">