-
-
- Top models
-
-
- Change vs prior period
-
-
-
- {leaderboardRows.length > 0 ? (
-
- {visibleLeaderboardRows.map((row) => {
- const rowIsLinked = Boolean(row.chartDataKey);
- const rowIsActive =
- row.chartDataKey !== null &&
- activeHoverSeriesKey === row.chartDataKey;
- const rowIsDimmed =
- Boolean(activeHoverSeriesKey) &&
- row.chartDataKey !== null &&
- row.chartDataKey !== activeHoverSeriesKey;
-
- let trendLabel = '0%';
- let trendClass = 'text-muted-foreground';
- if (row.trend === 'new') {
- trendLabel = 'new';
- trendClass = 'text-blue-500';
- } else if (row.trend === 'up' && row.trendPercent !== null) {
- trendLabel = `↑${formatTrendPercent(row.trendPercent)}%`;
- trendClass = 'text-emerald-500';
- } else if (
- row.trend === 'down' &&
- row.trendPercent !== null
- ) {
- trendLabel = `↓${formatTrendPercent(row.trendPercent)}%`;
- trendClass = 'text-red-500';
- } else if (row.trendPercent !== null) {
- trendLabel = `${formatTrendPercent(row.trendPercent)}%`;
- }
-
- return (
-
{
- if (row.chartDataKey) {
- setHoveredSeriesKey(row.chartDataKey);
- }
- }}
- onMouseLeave={() => {
- if (row.chartDataKey) {
- setHoveredSeriesKey(null);
- }
- }}
- >
-
- {row.rank}.
-
- {isMobile ? (
- <>
-
-
-
- {row.displayName}
- {' '}
-
- by {row.provider}
-
-
-
-
-
- {formatLeaderboardTotal(row.totalRaw)}
-
-
- {trendLabel}
-
-
- >
- ) : (
- <>
-
-
- {row.displayName}
- {' '}
-
- by {row.provider}
-
-
-
- {formatLeaderboardTotal(row.totalRaw)}
-
-
- {trendLabel}
-
- >
- )}
-
- );
- })}
-
- ) : (
-
- No model totals available for this range.
-
- )}
-
- {isMobile && hiddenLeaderboardCount > 0 ? (
-
- ) : null}
-
- {isMobile && showAllMobileRows && leaderboardRows.length > 10 ? (
-
- ) : null}
-
-