diff --git a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx index 63a4179fa0c..0433316c8c2 100644 --- a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx @@ -7,16 +7,16 @@ import { getEcosystemWalletUsage } from "data/analytics/wallets/ecosystem"; import { EcosystemWalletUsersChartCard } from "./EcosystemWalletUsersChartCard"; export async function EcosystemAnalyticsPage({ - ecosystemId, + ecosystemSlug, interval, range, -}: { ecosystemId: string; interval: "day" | "week"; range?: Range }) { +}: { ecosystemSlug: string; interval: "day" | "week"; range?: Range }) { if (!range) { range = getLastNDaysRange("last-120"); } const stats = await getEcosystemWalletUsage({ - ecosystemId, + ecosystemSlug, from: range.from, to: range.to, period: interval, diff --git a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx index 0dd293b987c..0b3f809d281 100644 --- a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/page.tsx @@ -22,7 +22,7 @@ export default async function Page(props: { const ecosystem = await getEcosystem(params.slug); return ( diff --git a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx index e66d848ded0..90149874100 100644 --- a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/components/EcosystemSlugLayout.tsx @@ -33,14 +33,14 @@ export async function EcosystemLayoutSlug({ } const allTimeStatsPromise = getEcosystemWalletUsage({ - ecosystemId: ecosystem.id, + ecosystemSlug: ecosystem.slug, from: new Date(2022, 0, 1), to: new Date(), period: "all", }); const monthlyStatsPromise = getEcosystemWalletUsage({ - ecosystemId: ecosystem.id, + ecosystemSlug: ecosystem.slug, from: new Date(new Date().getFullYear(), new Date().getMonth(), 1), to: new Date(), period: "month", diff --git a/apps/dashboard/src/data/analytics/wallets/ecosystem.ts b/apps/dashboard/src/data/analytics/wallets/ecosystem.ts index 7ee299a825d..877ea142b25 100644 --- a/apps/dashboard/src/data/analytics/wallets/ecosystem.ts +++ b/apps/dashboard/src/data/analytics/wallets/ecosystem.ts @@ -2,12 +2,12 @@ import type { EcosystemWalletStats } from "types/analytics"; import { fetchAnalytics } from "../fetch-analytics"; export async function getEcosystemWalletUsage(args: { - ecosystemId: string; + ecosystemSlug: string; from?: Date; to?: Date; period?: "day" | "week" | "month" | "year" | "all"; }) { - const { ecosystemId, from, to, period } = args; + const { ecosystemSlug, from, to, period } = args; const searchParams = new URLSearchParams(); if (from) { @@ -20,7 +20,7 @@ export async function getEcosystemWalletUsage(args: { searchParams.append("period", period); } const res = await fetchAnalytics( - `v1/wallets/ecosystem/${ecosystemId}?${searchParams.toString()}`, + `v1/wallets/ecosystem/${ecosystemSlug}?${searchParams.toString()}`, { method: "GET", headers: { @@ -30,7 +30,7 @@ export async function getEcosystemWalletUsage(args: { ); if (res?.status !== 200) { - console.error("Failed to fetch in-app wallet stats"); + console.error("Failed to fetch ecosystem wallet stats"); return null; }