Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 77a3603

Browse files
committed
change the title of the page to the title of the guide
1 parent c5cd28d commit 77a3603

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/common/header/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ class NavBar extends React.Component {
6363
render() {
6464
const pathName = this.props.router.pathname;
6565
const metaData = MetaInfo[pathName === '/' ? 'home' : pathName.split('/')[1]];
66-
const title = metaData.title;
66+
const title =
67+
pathName.split('/')[1] === 'learn'
68+
? `Learn ${this.props.router.query.subject[0].toUpperCase() +
69+
this.props.router.query.subject.slice(1)} | Coderplex`
70+
: metaData.title;
6771
const description = metaData.description;
6872
const image = metaData.image;
6973
return (

0 commit comments

Comments
 (0)