Skip to content

Commit 61455d4

Browse files
author
Ives van Hoorne
committed
Update titles of embed and editor
1 parent fce7a99 commit 61455d4

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/app/src/app/pages/Sandbox/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ class SandboxPage extends React.PureComponent<Props, State> {
152152
const sandbox = sandboxes[currentId];
153153

154154
if (sandbox) {
155-
document.title = sandbox.title
156-
? `${sandbox.title} - CodeSandbox`
157-
: 'Editor - CodeSandbox';
155+
document.title = `${sandbox.title || sandbox.id} - CodeSandbox`;
158156
}
159157

160158
return (

packages/app/src/embed/App.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ export default class App extends React.PureComponent<{}, State> {
137137
.then(res => res.json())
138138
.then(camelizeKeys);
139139

140-
document.title = response.data.title
141-
? `${response.data.title} - CodeSandbox`
142-
: 'Embed - CodeSandbox';
140+
document.title = `${sandbox.title || sandbox.id} - CodeSandbox`;
141+
143142
this.setState({ sandbox: response.data });
144143
} catch (e) {
145144
this.setState({ notFound: true });

0 commit comments

Comments
 (0)