The response shows the data is directly on res, not res.data. The API is returning the stats object directly. Let me fix the data extraction:
The API returns ApiResponseObject<{...}> which should wrap data in res.data. But the console log shows the response object directly without that wrapper. The backend is returning the stats directly, not wrapped. Let me check the component to see the type annotation and fix it:
Now I can see the issue. The response is directly the stats object (e.g., { commentsTotal: 5, ... }), but the code is trying to access res.data. The backend returns the stats directly without wrapping in a data property. Let me fix this:
Fixed the stats data extraction in YourActivityCard. The backend returns the stats object directly (not wrapped in data), but the code was trying to access res.data. Now it handles both response shapes by using res.data ?? res, which will use the direct response when data is undefined. This should make the activity stats display correctly.
Now I'll update the component to make the stats look like polished KPI tiles with large bold numbers and cleaner formatting:
Polished the "YOUR ACTIVITY" stats section with cleaner KPI-style tiles. Each stat now displays a large bold number (2xl font, tabular-nums for alignment), with a subtle tile background (bg-white/[0.02]) and border (border-white/5) for visual separation. The subline shows the time window and total in muted text. No changes were made to the API calls, data mapping, or other dashboard elements.
You can send messages while the preview loads