fix(ui/agents): swap SessionRow to typed dayjs helper

This commit is contained in:
Ishaan Jaffer 2026-05-06 15:12:09 -07:00
parent 15bb07d1fb
commit 62ccc79a4c
No known key found for this signature in database

View file

@ -8,7 +8,7 @@
*/
import Link from "next/link";
import { Tag, Typography } from "antd";
import dayjs from "dayjs";
import { relativeOrAbsolute } from "@/app/(dashboard)/agents/components/_dayjs";
import type { CloudAgentSession, CloudAgentSessionStatus } from "@/types/cloud-agents";
const { Text, Paragraph } = Typography;
@ -27,8 +27,7 @@ interface SessionRowProps {
}
export default function SessionRow({ session, active }: SessionRowProps) {
const updated = dayjs(session.updated_at);
const updatedLabel = updated.fromNow?.() ?? updated.format("YYYY-MM-DD HH:mm");
const updatedLabel = relativeOrAbsolute(session.updated_at);
return (
<Link
href={`/agents/${session.agent_id}/sessions/${session.session_id}`}