Skip to content

Commit fe691bb

Browse files
author
Parth Shah
committed
adding page titles
1 parent ecfcd21 commit fe691bb

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/components/Home/Home.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Home extends React.Component {
1212

1313
componentWillMount() {
1414
// redirect to project list if user is logged in.
15+
document.title = 'Connect - Topcoder'
1516
if (this.props.isLoggedIn)
1617
this.props.router.push('/projects')
1718
}
@@ -46,4 +47,4 @@ const mapStateToProps = ({loadUser}) => {
4647
}
4748
}
4849

49-
export default withRouter(connect(mapStateToProps)(Home))
50+
export default withRouter(connect(mapStateToProps)(Home))

src/projects/detail/ProjectDetail.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class ProjectDetail extends Component {
4747
// handle just deleted projects
4848
if (! (error || isLoading || isProcessing) && _.isEmpty(project))
4949
this.props.router.push('/projects/')
50+
if (project && project.name) {
51+
document.title = `${project.name} - Topcoder`
52+
}
5053
}
5154

5255
getProjectRoleForCurrentUser({currentUserId, project}) {

src/projects/list/components/Projects/Projects.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Projects extends Component {
1515
}
1616

1717
componentWillMount() {
18+
document.title = 'Projects - Topcoder'
1819
// this.searchTermFromQuery = this.props.location.query.q || ''
1920
const {criteria, loadProjects} = this.props
2021
let pageNum = this.props.pageNum

0 commit comments

Comments
 (0)