diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx index 857f7b5ca2f..fee25daf6cf 100644 --- a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx @@ -1,7 +1,7 @@ +import { type Project, getProject } from "@/api/projects"; +import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; import { notFound } from "next/navigation"; -import { getProject } from "@/api/projects"; - import { type DurationId, type Range, @@ -22,6 +22,7 @@ import { isProjectActive, } from "@/api/analytics"; import { EmptyStateCard } from "app/team/components/Analytics/EmptyStateCard"; +import { Suspense } from "react"; import { type ChainMetadata, defineChain, @@ -69,6 +70,43 @@ export default async function ProjectOverviewPage(props: PageProps) { const isActive = await isProjectActive({ clientId: project.publishableKey }); + return ( +
+
+ +
+ {!isActive ? ( +
+ +
+ ) : ( +
+ }> + + +
+ )} +
+ ); +} + +async function ProjectAnalytics(props: { + project: Project; + range: Range; + interval: "day" | "week"; + searchParams: PageSearchParams; +}) { + const { project, range, interval, searchParams } = props; + // Fetch all analytics data in parallel const [ walletConnections, @@ -114,79 +152,64 @@ export default async function ProjectOverviewPage(props: PageProps) { ]); return ( -
-
- -
- {!isActive ? ( -
- +
+ {walletUserStatsTimeSeries.some((w) => w.totalUsers !== 0) ? ( +
+
) : ( -
- {walletUserStatsTimeSeries.some((w) => w.totalUsers !== 0) ? ( -
- -
- ) : ( - - )} - + )} + +
+ {walletConnections.length > 0 ? ( + + ) : ( + + )} + {inAppWalletUsage.length > 0 ? ( + + ) : ( + + )} +
+ {userOpUsage.length > 0 ? ( +
+ -
- {walletConnections.length > 0 ? ( - - ) : ( - - )} - {inAppWalletUsage.length > 0 ? ( - - ) : ( - - )} -
- {userOpUsage.length > 0 ? ( -
- -
- ) : ( - - )}
+ ) : ( + )}
);