Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import { useTranslations } from "next-intl";
import {
Calendar,
Clock,
Expand All @@ -12,18 +11,19 @@ import {
Server,
Zap,
} from "lucide-react";
import { useTranslations } from "next-intl";
import { Badge } from "@/components/ui/badge";
import { Separator } from "@/components/ui/separator";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";
import { type CurrencyCode, formatCurrency } from "@/lib/utils/currency";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";

interface SessionStatsProps {
stats: {
userAgent: string | null;
requestCount: number;
firstRequestAt: string | null;
lastRequestAt: string | null;
firstRequestAt: Date | string | null;
lastRequestAt: Date | string | null;
totalDurationMs: number;
providers: { id: number; name: string }[];
models: string[];
Expand Down Expand Up @@ -218,9 +218,9 @@ function TokenRow({
);
}

function TimeRow({ label, date }: { label: string; date: string | null }) {
function TimeRow({ label, date }: { label: string; date: Date | string | null }) {
if (!date) return null;
const d = new Date(date);
const d = date instanceof Date ? date : new Date(date);
return (
<div className="flex flex-col gap-0.5">
<span className="text-[10px] text-muted-foreground uppercase">{label}</span>
Expand Down