Feat: add stats page

This commit is contained in:
jwinterm
2026-02-01 12:53:29 -05:00
parent f63bafbc48
commit 31be623856
5 changed files with 193 additions and 3 deletions
+21
View File
@@ -406,3 +406,24 @@ export async function getUserCount(): Promise<UserCountResponse> {
return res.json();
}
// =============================================================================
// Public Stats
// =============================================================================
export interface PublicStats {
total_users: number;
users_by_preferred_asset: Record<string, number>;
linked_accounts_by_platform: Record<string, number>;
total_tips_sent: number;
}
export async function getPublicStats(): Promise<PublicStats> {
const res = await fetch(`${API_URL}/api/v1/stats/public`);
if (!res.ok) {
throw new Error('Failed to get stats');
}
return res.json();
}