Skip to content

Commit a5b3dd3

Browse files
committed
fix colors
1 parent e1b76d7 commit a5b3dd3

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/PieChartCard.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ export function PieChartCard({
2828
const sorted = [...data].sort((a, b) => b.value - a.value);
2929

3030
// Take top 9
31-
const top10 = sorted.slice(0, 9).map((item, index) => ({
31+
const top10 = sorted.slice(0, 9).map((item) => ({
3232
...item,
33-
fill: item.fill || `hsl(var(--chart-${index + 1}))`,
3433
}));
3534

3635
// Aggregate the rest
@@ -47,7 +46,10 @@ export function PieChartCard({
4746
}
4847

4948
return top10;
50-
})();
49+
})().map((item, index) => ({
50+
...item,
51+
fill: item.fill || `hsl(var(--chart-${index + 1}))`,
52+
}));
5153

5254
return (
5355
<Card className="flex flex-col">

apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function processTimeSeriesData(
181181

182182
let cumulativeUsers = 0;
183183
for (const stat of userStats) {
184-
cumulativeUsers += stat.totalUsers ?? 0;
184+
cumulativeUsers += stat.newUsers ?? 0;
185185
metrics.push({
186186
date: stat.date,
187187
activeUsers: stat.totalUsers ?? 0,
@@ -228,8 +228,8 @@ function UsersChartCard({
228228
trendFn={(data, key) =>
229229
data.filter((d) => (d[key] as number) > 0).length >= 3
230230
? ((data[data.length - 2]?.[key] as number) ?? 0) /
231-
((data[data.length - 3]?.[key] as number) ?? 0) -
232-
1
231+
((data[data.length - 3]?.[key] as number) ?? 0) -
232+
1
233233
: undefined
234234
}
235235
existingQueryParams={searchParams}
@@ -240,12 +240,7 @@ function UsersChartCard({
240240
async function WalletDistributionCard({ data }: { data: WalletStats[] }) {
241241
const formattedData = await Promise.all(
242242
data
243-
.filter(
244-
(w) =>
245-
w.walletType !== "smart" &&
246-
w.walletType !== "unknown" &&
247-
w.walletType !== "inApp",
248-
)
243+
.filter((w) => w.walletType !== "smart")
249244
.map(async (w) => {
250245
const wallet = await getWalletInfo(w.walletType as WalletId).catch(
251246
() => ({ name: w.walletType }),

0 commit comments

Comments
 (0)