Skip to content

Commit 093aafd

Browse files
committed
feat: update ApplicationStatsChart to use new session count fields
1 parent 8487675 commit 093aafd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/client/components/application/ApplicationStatsChart.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,11 @@ export const ApplicationStatsChart: React.FC<ApplicationStatsChartProps> =
151151

152152
<StatCard
153153
label={t('Sessions')}
154-
curr={statsData.sessions.total}
155-
diff={statsData.sessions.diff}
154+
curr={data?.currentTotalSessionCount || 0}
155+
diff={
156+
(data?.currentTotalSessionCount || 0) -
157+
(data?.previousTotalSessionCount || 0)
158+
}
156159
/>
157160

158161
<StatCard

src/server/trpc/routers/application.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ export const applicationRouter = router({
322322
z.object({
323323
current: eventStatsQueryResultItemSchema.array(),
324324
previous: eventStatsQueryResultItemSchema.array(),
325+
currentTotalSessionCount: z.number(),
326+
previousTotalSessionCount: z.number(),
325327
})
326328
)
327329
.query(async ({ ctx, input }) => {

0 commit comments

Comments
 (0)