Skip to content

Commit 4d36b85

Browse files
refactor(site): make few ui changes on template insights (#8774)
1 parent 5c9167d commit 4d36b85

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

site/src/pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const TemplateUsagePanel = ({
186186
return (
187187
<Panel {...panelProps}>
188188
<PanelHeader>
189-
<PanelTitle>App&lsquo;s & IDE usage</PanelTitle>
189+
<PanelTitle>App & IDE Usage</PanelTitle>
190190
<PanelSubtitle>Last 7 days</PanelSubtitle>
191191
</PanelHeader>
192192
<PanelContent>
@@ -244,7 +244,7 @@ const TemplateUsagePanel = ({
244244
sx={{
245245
fontSize: 13,
246246
color: (theme) => theme.palette.text.secondary,
247-
width: 200,
247+
width: 120,
248248
flexShrink: 0,
249249
}}
250250
>
@@ -339,13 +339,13 @@ function formatTime(seconds: number): string {
339339
const minutes = Math.floor(seconds / 60)
340340
return minutes + " minutes"
341341
} else {
342-
const hours = Math.floor(seconds / 3600)
343-
const remainingMinutes = Math.floor((seconds % 3600) / 60)
344-
if (remainingMinutes === 0) {
345-
return hours + " hours"
346-
} else {
347-
return hours + " hours, " + remainingMinutes + " minutes"
342+
const hours = seconds / 3600
343+
const minutes = Math.floor(seconds % 3600)
344+
if (minutes === 0) {
345+
return hours.toFixed(0) + " hours"
348346
}
347+
348+
return hours.toFixed(1) + " hours"
349349
}
350350
}
351351

0 commit comments

Comments
 (0)