Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 761d1a5

Browse files
committed
Add meta tags to notifications
1 parent 11d04dc commit 761d1a5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/views/notifications/index.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { CommunityInviteNotification } from './components/communityInviteNotific
1919
import { NewUserInCommunityNotification } from './components/newUserInCommunityNotification';
2020
import { Column } from '../../components/column';
2121
import AppViewWrapper from '../../components/appViewWrapper';
22+
import Head from '../../components/head';
2223
import Titlebar from '../../views/titlebar';
2324
import {
2425
displayLoadingNotifications,
@@ -45,6 +46,7 @@ import {
4546
UpsellNullNotifications,
4647
} from '../../components/upsell';
4748
import BrowserNotificationRequest from './components/browserNotificationRequest';
49+
import generateMetaInfo from 'shared/generate-meta-info';
4850

4951
class NotificationsPure extends Component {
5052
state: {
@@ -175,10 +177,15 @@ class NotificationsPure extends Component {
175177
);
176178
}
177179

180+
const { title, description } = generateMetaInfo({
181+
type: 'notifications',
182+
});
183+
178184
if (!data.notifications || data.notifications.edges.length === 0) {
179185
return (
180186
<AppViewWrapper>
181187
<Column type={'primary'}>
188+
<Head title={title} description={description} />
182189
<UpsellNullNotifications />
183190
</Column>
184191
</AppViewWrapper>
@@ -198,15 +205,17 @@ class NotificationsPure extends Component {
198205

199206
return (
200207
<FlexCol style={{ flex: '1 1 auto' }}>
208+
<Head title={title} description={description} />
201209
<Titlebar title={'Notifications'} provideBack={false} noComposer />
202210
<AppViewWrapper>
203211
<Column type={'primary'}>
204-
{this.state.showWebPushPrompt &&
212+
{this.state.showWebPushPrompt && (
205213
<BrowserNotificationRequest
206214
onSubscribe={this.subscribeToWebPush}
207215
onDismiss={this.dismissWebPushRequest}
208216
loading={this.state.webPushPromptLoading}
209-
/>}
217+
/>
218+
)}
210219
<InfiniteList
211220
pageStart={0}
212221
loadMore={data.fetchMore}

0 commit comments

Comments
 (0)