mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-12 02:27:36 -04:00
Add dynamic page title support to NoSEO component and update notifications page usage
This commit is contained in:
@@ -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 (
|
||||
<Head>
|
||||
<title>{title}</title>
|
||||
<meta name="robots" content="noindex,follow" />
|
||||
</Head>
|
||||
)
|
||||
|
||||
@@ -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<P extends Record<string, string | undefined>>(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 (
|
||||
<Head>
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function NotificationsPage() {
|
||||
|
||||
return (
|
||||
<PageBase trackPageView={'notifications page'} className={'mx-4'}>
|
||||
<NoSEO />
|
||||
<NoSEO title={t('notifications.title', 'Updates')} />
|
||||
<Title>{t('notifications.title', 'Updates')}</Title>
|
||||
<UncontrolledTabs
|
||||
name={'notifications-page'}
|
||||
|
||||
Reference in New Issue
Block a user