aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Thread.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-11-01 20:28:30 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit4b8d5219a2320e6d3d1e1260574bd6042c97b27e (patch)
tree11f5607560b2f45b3782a88fdc2962cf696b50f5 /vnext/src/ui/Thread.js
parentb197e2616db62e25227548bfdb085f4e1f2908f0 (diff)
Add page titles
Diffstat (limited to 'vnext/src/ui/Thread.js')
-rw-r--r--vnext/src/ui/Thread.js5
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}>