Skip to content

Commit 18d6339

Browse files
paulovitinflovilmart
authored andcommitted
Add classname to browser title (#913)
* Add classname to browser title * Change to react-helmet * Fix the classname get
1 parent 1185c79 commit 18d6339

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"json-file-plus": "3.2.0",
4545
"package-json": "5.0.0",
4646
"passport": "0.4.0",
47-
"passport-local": "1.0.0"
47+
"passport-local": "1.0.0",
48+
"react-helmet": "5.2.0"
4849
},
4950
"devDependencies": {
5051
"@babel/core": "7.2.2",

src/dashboard/Dashboard.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import {
5353
} from 'react-router';
5454
import { Route, Redirect } from 'react-router-dom';
5555
import createClass from 'create-react-class';
56+
import { Helmet } from 'react-helmet';
5657

5758
const ShowSchemaOverview = false; //In progress features. Change false to true to work on this feature.
5859

@@ -257,7 +258,7 @@ export default class Dashboard extends React.Component {
257258
<Route path={ match.path + '/webhooks' } component={Webhooks} />
258259

259260
<Route path={ match.path + '/jobs' } component={JobsRoute}/>
260-
261+
261262
<Route path={ match.path + '/logs/:type' } render={(props) => (
262263
<Logs {...props} params={props.match.params} />
263264
)} />
@@ -266,7 +267,7 @@ export default class Dashboard extends React.Component {
266267
<Route path={ match.path + '/config' } component={Config} />
267268
<Route path={ match.path + '/api_console' } component={ApiConsole} />
268269
<Route path={ match.path + '/migration' } component={Migration} />/>
269-
270+
270271

271272
<Redirect exact from={ match.path + '/push' } to='/apps/:appId/push/new' />
272273
<Redirect exact from={ match.path + '/push/activity' } to='/apps/:appId/push/activity/all' />
@@ -301,6 +302,9 @@ export default class Dashboard extends React.Component {
301302
return (
302303
<Router history={history}>
303304
<div>
305+
<Helmet>
306+
<title>Parse Dashboard</title>
307+
</Helmet>
304308
<Switch>
305309
<Route path='/apps' component={Index} />
306310
<Route path='/account/overview' component={AccountSettingsPage} />

src/dashboard/Data/Browser/Browser.react.js

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import styles from 'dashboard/Data/Browser/Browser.s
3333
import subscribeTo from 'lib/subscribeTo';
3434
import * as ColumnPreferences from 'lib/ColumnPreferences';
3535
import * as queryString from 'query-string';
36+
import { Helmet } from 'react-helmet';
3637

3738
export default
3839
@subscribeTo('Schema', 'schema')
@@ -1031,6 +1032,7 @@ class Browser extends DashboardView {
10311032
}
10321033

10331034
let notification = null;
1035+
const pageTitle = `${this.props.params.className} - Parse Dashboard`;
10341036

10351037
if (this.state.lastError) {
10361038
notification = (
@@ -1043,6 +1045,9 @@ class Browser extends DashboardView {
10431045
}
10441046
return (
10451047
<div>
1048+
<Helmet>
1049+
<title>{pageTitle}</title>
1050+
</Helmet>
10461051
{browser}
10471052
{notification}
10481053
{extras}

0 commit comments

Comments
 (0)