Skip to content
Merged
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: 0 additions & 17 deletions apps/sim/ee/organization-usage/components/usage-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,11 @@ import { Badge } from '@sim/emcn'
import { BarChart } from '@/components/charts'
import type { OrganizationUsageSummary } from '@/lib/api/contracts/organization-usage'
import { formatCreditsLabel } from '@/lib/billing/credits/conversion'
import { SegmentedMeter } from '@/app/workspace/[workspaceId]/settings/components/segmented-meter'
import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state'

/** Consumption, matching the seat meter's indicator rather than an outcome colour. */
const USAGE_SERIES_COLOR = 'var(--indicator-seat-filled)'

/**
* A credit allowance runs to the millions, so the meter cannot be countable the way
* the seat meter is — a fixed count reads as a percentage instead. Matches the seat
* overview's own fallback.
*/
const ALLOWANCE_SEGMENTS = 24

interface UsageSummaryProps {
summary?: OrganizationUsageSummary
/** Pooled allowance in credits, from the organization's billing data. `null` when uncapped. */
Expand Down Expand Up @@ -95,15 +87,6 @@ export function UsageSummary({ summary, limitCredits, isLoading, isError }: Usag
)}
</div>

{/*
The shared allowance meter, not a second bar drawn from the same token.
`SegmentedMeter` already owns the overage tone, and it is the affordance the
seat overview uses for exactly this question.
*/}
{hasLimit && (
<SegmentedMeter used={used} total={limitCredits} segments={ALLOWANCE_SEGMENTS} />
)}

<BarChart data={series} label='' color={USAGE_SERIES_COLOR} unit='credits' height={160} />
</div>
)
Expand Down
Loading