call row fix

This commit is contained in:
Logan
2026-05-23 13:11:42 -04:00
parent fc993fdfe6
commit 0ceb0227c8
+3 -14
View File
@@ -67,20 +67,9 @@ export function CallRow({ call, systemName, isAdmin }: Props) {
className={`border-b border-gray-800 font-mono text-sm ${hasDetails ? "cursor-pointer hover:bg-gray-900/50" : "hover:bg-gray-900/30"}`}
onClick={() => hasDetails && setExpanded((v) => !v)}
>
<td className="px-4 py-2 text-gray-400 text-xs">
{(() => {
const d = new Date(call.started_at);
const today = new Date();
const isToday = d.toDateString() === today.toDateString();
return isToday ? (
d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
) : (
<span>
<span className="text-gray-600">{d.toLocaleDateString([], { month: "short", day: "numeric" })} </span>
{d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}
</span>
);
})()}
<td className="px-4 py-2 text-gray-400 text-xs whitespace-nowrap">
<span className="text-gray-600">{new Date(call.started_at).toLocaleDateString([], { month: "short", day: "numeric" })} </span>
{new Date(call.started_at).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}
</td>
<td className="px-4 py-2 text-gray-300">
<span>{call.talkgroup_name || call.talkgroup_id || "—"}</span>