mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
fix(ui/agents): swap AgentList to typed dayjs helper
Optional-chaining dayjs(...).fromNow?.() was a TS error because the relativeTime plugin wasn't loaded. Use relativeOrAbsolute() from the shared helper instead.
This commit is contained in:
parent
d75651912e
commit
15bb07d1fb
1 changed files with 2 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
|||
import Link from "next/link";
|
||||
import { Card, Table, Tag, Typography, Empty } from "antd";
|
||||
import type { ColumnsType } from "antd/es/table";
|
||||
import dayjs from "dayjs";
|
||||
import { relativeOrAbsolute } from "@/app/(dashboard)/agents/components/_dayjs";
|
||||
import type { CloudAgent } from "@/types/cloud-agents";
|
||||
|
||||
const { Text } = Typography;
|
||||
|
|
@ -41,8 +41,7 @@ export default function AgentList({ agents, loading }: AgentListProps) {
|
|||
title: "Last activity",
|
||||
dataIndex: "last_activity_at",
|
||||
key: "last_activity_at",
|
||||
render: (value: string | null) =>
|
||||
value ? dayjs(value).fromNow?.() ?? dayjs(value).format("YYYY-MM-DD HH:mm") : "—",
|
||||
render: (value: string | null) => relativeOrAbsolute(value),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue