diff options
author | Vitaly Takmazov | 2022-11-01 20:28:30 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:58 +0300 |
commit | 4b8d5219a2320e6d3d1e1260574bd6042c97b27e (patch) | |
tree | 11f5607560b2f45b3782a88fdc2962cf696b50f5 /vnext/src/ui/Thread.js | |
parent | b197e2616db62e25227548bfdb085f4e1f2908f0 (diff) |
Add page titles
Diffstat (limited to 'vnext/src/ui/Thread.js')
-rw-r--r-- | vnext/src/ui/Thread.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js index b2d17824..48cdf27c 100644 --- a/vnext/src/ui/Thread.js +++ b/vnext/src/ui/Thread.js @@ -8,6 +8,7 @@ import Spinner from './Spinner'; import { getMessages, comment, update } from '../api'; import { useVisitor } from './VisitorContext'; +import { Helmet } from 'react-helmet'; /** * @type { import('../api').Message } */ @@ -94,8 +95,12 @@ export default function Thread(props) { }, [props.connection, message.mid, onReply]); const loaders = Math.min(message.replies || 0, 10); + const pageTitle = `${message.user.uname} ${message && message.tags || 'thread'}`; return ( <> + <Helmet> + <title>{pageTitle}</title> + </Helmet> { message.mid ? ( <Message data={message}> |