Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ea9a26

Browse files
committed
Fix title
1 parent 864c6dd commit 7ea9a26

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

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

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,31 @@ import { UserAvatar } from "components/UserAvatar/UserAvatar"
1919
import { getLatencyColor } from "utils/latency"
2020
import chroma from "chroma-js"
2121
import { colors } from "theme/colors"
22+
import { Helmet } from "react-helmet-async"
23+
import { getTemplatePageTitle } from "../utils"
2224

2325
export default function TemplateInsightsPage() {
26+
const { template } = useTemplateLayoutContext()
27+
2428
return (
25-
<Box
26-
sx={{
27-
display: "grid",
28-
gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
29-
gridTemplateRows: "440px auto",
30-
gap: (theme) => theme.spacing(3),
31-
}}
32-
>
33-
<DailyUsersPanel sx={{ gridColumn: "span 2" }} />
34-
<UserLatencyPanel />
35-
<TemplateUsagePanel sx={{ gridColumn: "span 3" }} />
36-
</Box>
29+
<>
30+
<Helmet>
31+
<title>{getTemplatePageTitle("Insights", template)}</title>
32+
</Helmet>
33+
34+
<Box
35+
sx={{
36+
display: "grid",
37+
gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
38+
gridTemplateRows: "440px auto",
39+
gap: (theme) => theme.spacing(3),
40+
}}
41+
>
42+
<DailyUsersPanel sx={{ gridColumn: "span 2" }} />
43+
<UserLatencyPanel />
44+
<TemplateUsagePanel sx={{ gridColumn: "span 3" }} />
45+
</Box>
46+
</>
3747
)
3848
}
3949

0 commit comments

Comments
 (0)