File tree Expand file tree Collapse file tree
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/users Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,21 @@ import { useAdminApp } from "../use-admin-app";
1212
1313function TotalUsersDisplay ( ) {
1414 const stackAdminApp = useAdminApp ( ) ;
15- const data = ( stackAdminApp as any ) [ stackAppInternalsSymbol ] . useMetrics ( ) ;
15+ const metrics = ( stackAdminApp as any ) [ stackAppInternalsSymbol ] . useMetrics ( false ) ;
16+ const metricsIncludingAnonymous = ( stackAdminApp as any ) [ stackAppInternalsSymbol ] . useMetrics ( true ) ;
1617
17- return < > { data . total_users } </ > ;
18+ const anonymousUsersCount = metricsIncludingAnonymous . total_users - metrics . total_users ;
19+
20+ return (
21+ < >
22+ { metrics . total_users }
23+ { anonymousUsersCount > 0 ? (
24+ < >
25+ { " " } (+ { anonymousUsersCount } anonymous)
26+ </ >
27+ ) : null }
28+ </ >
29+ ) ;
1830}
1931
2032export default function PageClient ( ) {
You can’t perform that action at this time.
0 commit comments