import { HoverCardTimestamp } from "@/components/common/hover-card-timestamp"; import { cn } from "@/lib/utils"; import { format } from "date-fns"; export function TableCellDate({ value, className, formatStr = "LLL dd, y HH:mm:ss", ...props }: React.ComponentProps<"div"> & { value: unknown; formatStr?: string }) { if (value instanceof Date) { return (
{format(value, formatStr)}
); } if (typeof value === "string") { return (
{value}
); } return (
-
); }