Skip to content

Commit 65fecb4

Browse files
fix(web): align the API estimate info icon
1 parent 0caa95d commit 65fecb4

1 file changed

Lines changed: 20 additions & 26 deletions

File tree

‎apps/web/src/components/usage/UsagePage.tsx‎

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -586,33 +586,27 @@ export function UsagePage() {
586586
? formatUsd(merged.costUsd)
587587
: formatTokens(merged.totalTokens)}
588588
</span>
589-
<span className="text-xs text-muted-foreground">
590-
<span className={figureClass(loading.partial)}>
591-
{formatCount(merged.sessions)} sessions
589+
<span className="inline-flex items-center gap-1 text-xs text-muted-foreground">
590+
<span>
591+
<span className={figureClass(loading.partial)}>
592+
{formatCount(merged.sessions)} sessions
593+
</span>
594+
{metric === "cost" && " · API estimate"}
592595
</span>
593-
{metric === "cost" && (
594-
<>
595-
{" · API estimate"}
596-
{merged.costQuality.unpricedShare > 0 && (
597-
<>
598-
{" "}
599-
<Popover>
600-
<PopoverTrigger
601-
openOnHover
602-
render={<InlineButton tone="muted" />}
603-
aria-label="Unpriced usage details"
604-
>
605-
<InfoIcon className="size-3" aria-hidden />
606-
</PopoverTrigger>
607-
<PopoverPopup side="top" tooltipStyle>
608-
API estimate excludes{" "}
609-
{formatPercent(merged.costQuality.unpricedShare)} unpriced
610-
records.
611-
</PopoverPopup>
612-
</Popover>
613-
</>
614-
)}
615-
</>
596+
{metric === "cost" && merged.costQuality.unpricedShare > 0 && (
597+
<Popover>
598+
<PopoverTrigger
599+
openOnHover
600+
render={<InlineButton tone="muted" />}
601+
aria-label="Unpriced usage details"
602+
>
603+
<InfoIcon className="size-3" aria-hidden />
604+
</PopoverTrigger>
605+
<PopoverPopup side="top" tooltipStyle>
606+
API estimate excludes{" "}
607+
{formatPercent(merged.costQuality.unpricedShare)} unpriced records.
608+
</PopoverPopup>
609+
</Popover>
616610
)}
617611
</span>
618612
</div>

0 commit comments

Comments
 (0)