Skip to content

Commit 2faa15a

Browse files
Add HTML <title> Tags (#1321)
Add title tags to most important pages, add a fallback title page so any other pages will have something basic. Fixes HDX-2706
1 parent 1e39e13 commit 2faa15a

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

.changeset/odd-emus-kiss.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
Add title tag to app where missed (including catchall title)

packages/app/pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
109109
return (
110110
<React.Fragment>
111111
<Head>
112+
<title>HyperDX</title>
112113
<link rel="icon" type="image/png" sizes="32x32" href="/Icon32.png" />
113114
<meta
114115
name="viewport"

packages/app/src/DBChartPage.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback, useRef, useState } from 'react';
22
import dynamic from 'next/dynamic';
3+
import Head from 'next/head';
34
import { parseAsJson, parseAsStringEnum, useQueryState } from 'nuqs';
45
import { useForm } from 'react-hook-form';
56
import { useHotkeys } from 'react-hotkeys-hook';
@@ -223,6 +224,9 @@ function DBChartExplorerPage() {
223224

224225
return (
225226
<Box data-testid="chart-explorer-page" p="sm" className="bg-hdx-dark">
227+
<Head>
228+
<title>Chart Explorer - HyperDX</title>
229+
</Head>
226230
<AIAssistant
227231
setConfig={setChartConfig}
228232
onTimeRangeSelect={onTimeRangeSelect}

packages/app/src/DBSearchPage.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
useState,
99
} from 'react';
1010
import dynamic from 'next/dynamic';
11+
import Head from 'next/head';
1112
import Link from 'next/link';
1213
import router from 'next/router';
1314
import {
@@ -1275,6 +1276,11 @@ function DBSearchPage() {
12751276

12761277
return (
12771278
<Flex direction="column" h="100vh" style={{ overflow: 'hidden' }}>
1279+
<Head>
1280+
<title>
1281+
{savedSearch ? `${savedSearch.name} Search` : 'Search'} - HyperDX
1282+
</title>
1283+
</Head>
12781284
{!IS_LOCAL_MODE && isAlertModalOpen && (
12791285
<DBSearchPageAlertModal
12801286
id={savedSearch?.id}

0 commit comments

Comments
 (0)