From c6c9d5b7b5e41dd06f914651bc9826dc642e54cd Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Thu, 9 Apr 2026 12:21:17 +0200 Subject: [PATCH] Add dynamic page title support to NoSEO component and update notifications page usage --- web/components/NoSEO.tsx | 6 +++++- web/components/SEO.tsx | 3 +-- web/pages/notifications.tsx | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/components/NoSEO.tsx b/web/components/NoSEO.tsx index 53437b10..ad786f37 100644 --- a/web/components/NoSEO.tsx +++ b/web/components/NoSEO.tsx @@ -1,9 +1,13 @@ +import {endTitle} from 'common/envs/constants' import Head from 'next/head' /** Exclude page from search results */ -export function NoSEO() { +export function NoSEO(props: {title?: string}) { + let title = props.title ? props.title + ' | ' : '' + title += endTitle return ( + {title} ) diff --git a/web/components/SEO.tsx b/web/components/SEO.tsx index 60c2f82e..66ad6f47 100644 --- a/web/components/SEO.tsx +++ b/web/components/SEO.tsx @@ -1,4 +1,4 @@ -import {IS_PROD} from 'common/envs/constants' +import {endTitle} from 'common/envs/constants' import {removeUndefinedProps} from 'common/util/object' import {buildOgUrl} from 'common/util/og' import Head from 'next/head' @@ -16,7 +16,6 @@ export function SEO

>(props: { image ?? (ogProps && buildOgUrl(removeUndefinedProps(ogProps.props) as any, ogProps.endpoint)) const absUrl = 'https://compassmeet.com' + url - const endTitle = IS_PROD ? 'Compass' : 'Compass dev' return ( diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index 344dfdd9..0cd18f7d 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -22,7 +22,7 @@ export default function NotificationsPage() { return ( - + {t('notifications.title', 'Updates')}