Skip to content

Commit fe15a71

Browse files
committed
fix: client analytics for ecosystem wallet
1 parent d1716fc commit fe15a71

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import { getEcosystemWalletUsage } from "data/analytics/wallets/ecosystem";
77
import { EcosystemWalletUsersChartCard } from "./EcosystemWalletUsersChartCard";
88

99
export async function EcosystemAnalyticsPage({
10-
ecosystemId,
10+
ecosystemSlug,
1111
interval,
1212
range,
13-
}: { ecosystemId: string; interval: "day" | "week"; range?: Range }) {
13+
}: { ecosystemSlug: string; interval: "day" | "week"; range?: Range }) {
1414
if (!range) {
1515
range = getLastNDaysRange("last-120");
1616
}
1717

1818
const stats = await getEcosystemWalletUsage({
19-
ecosystemId,
19+
ecosystemSlug,
2020
from: range.from,
2121
to: range.to,
2222
period: interval,

apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default async function Page(props: {
2222
const ecosystem = await getEcosystem(params.slug);
2323
return (
2424
<EcosystemAnalyticsPage
25-
ecosystemId={ecosystem.id}
25+
ecosystemSlug={ecosystem.slug}
2626
interval={searchParams.interval || "week"}
2727
range={searchParams.range}
2828
/>

apps/dashboard/src/data/analytics/wallets/ecosystem.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import type { EcosystemWalletStats } from "types/analytics";
22
import { fetchAnalytics } from "../fetch-analytics";
33

44
export async function getEcosystemWalletUsage(args: {
5-
ecosystemId: string;
5+
ecosystemSlug: string;
66
from?: Date;
77
to?: Date;
88
period?: "day" | "week" | "month" | "year" | "all";
99
}) {
10-
const { ecosystemId, from, to, period } = args;
10+
const { ecosystemSlug, from, to, period } = args;
1111

1212
const searchParams = new URLSearchParams();
1313
if (from) {
@@ -20,7 +20,7 @@ export async function getEcosystemWalletUsage(args: {
2020
searchParams.append("period", period);
2121
}
2222
const res = await fetchAnalytics(
23-
`v1/wallets/ecosystem/${ecosystemId}?${searchParams.toString()}`,
23+
`v1/wallets/ecosystem/${ecosystemSlug}?${searchParams.toString()}`,
2424
{
2525
method: "GET",
2626
headers: {
@@ -30,7 +30,7 @@ export async function getEcosystemWalletUsage(args: {
3030
);
3131

3232
if (res?.status !== 200) {
33-
console.error("Failed to fetch in-app wallet stats");
33+
console.error("Failed to fetch ecosystem-app wallet stats");
3434
return null;
3535
}
3636

0 commit comments

Comments
 (0)