Skip to content

Commit 7808950

Browse files
fix(web): align the API estimate info icon (pingdotgg#15655)
1 parent 5310a4a commit 7808950

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

0 commit comments

Comments
 (0)