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
17 changes: 6 additions & 11 deletions apps/web/src/components/usage/UsageLimitsPooled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function PoolSegment({
readonly color: string;
readonly now: number;
readonly index: number;
readonly showAccountName: boolean;
readonly showAccountPercentage: boolean;
}) {
return account.redeem ? (
<RedeemableSegment account={account} redeemAt={account.redeem} {...props} />
Expand Down Expand Up @@ -333,13 +333,13 @@ function SegmentTriggers({
color,
now,
index,
showAccountName,
showAccountPercentage,
}: SegmentPayload & {
readonly refillPercent: number;
readonly color: string;
readonly now: number;
readonly index: number;
readonly showAccountName: boolean;
readonly showAccountPercentage: boolean;
}) {
const popover = use(SegmentPopoverContext) ?? undefined;
const payload: SegmentPayload = { account, window, reset, redeem };
Expand Down Expand Up @@ -398,14 +398,9 @@ function SegmentTriggers({
{index}
</span>
<div className="relative hidden h-full min-w-0 items-center gap-1.5 overflow-hidden rounded-md px-2 text-xs @2xl/pool:flex">
{showAccountName ? (
<AccountName
account={account}
className="min-w-0 truncate font-medium text-foreground"
/>
) : null}
<AccountName account={account} className="min-w-0 truncate font-medium text-foreground" />
Comment thread
Kamkmgamer marked this conversation as resolved.
Resolved
{/* A single-account bar repeats the headline percentage. */}
{showAccountName ? (
{showAccountPercentage ? (
<span className="shrink-0 font-semibold text-foreground tabular-nums">
{remaining}%
</span>
Expand Down Expand Up @@ -519,7 +514,7 @@ function PoolBar({
color={normalizeProviderAccentColor(member.account.accentColor) ?? color}
now={now}
index={position + 1}
showAccountName={pool.columns.length > 1}
showAccountPercentage={pool.columns.length > 1}
/>
) : null,
)}
Expand Down
Loading