Skip to content

Commit dc82b8f

Browse files
committed
changed title for better seo
1 parent ca74574 commit dc82b8f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

client/modules/User/components/Collection.jsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,10 @@ class Collection extends React.Component {
181181
}
182182

183183
getTitle() {
184-
if (this.props.username === this.props.user.username) {
185-
return this.props.t('Collection.Title');
186-
}
187-
return this.props.t('Collection.AnothersTitle', {
188-
anotheruser: this.props.username
189-
});
184+
const collectionTitle = this.props.t('Collection.Title');
185+
const titleSplits = collectionTitle.split('|');
186+
const title = titleSplits[0].concat('| ');
187+
return title;
190188
}
191189

192190
getUsername() {
@@ -418,7 +416,7 @@ class Collection extends React.Component {
418416
>
419417
<article className="collection">
420418
<Helmet>
421-
<title>{this.getTitle()}</title>
419+
<title>{this.getTitle() + title}</title>
422420
</Helmet>
423421
{this._renderLoader()}
424422
{this.hasCollection() && this._renderCollectionMetadata()}

0 commit comments

Comments
 (0)