Skip to content

Commit 953dabd

Browse files
author
Ives van Hoorne
committed
Update embed document titles with sandbox title
1 parent 8f3341a commit 953dabd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// prettier-ignore
21
const webpack = require('webpack');
32
const path = require('path');
43
const paths = require('./paths');

src/embed/App.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ export default class App extends React.PureComponent {
112112
m => m.title === 'index.js' && m.directoryShortid == null,
113113
).shortid;
114114

115+
document.title = response.data.title
116+
? `${response.data.title} - CodeSandbox`
117+
: 'Embed - CodeSandbox';
115118
this.setState({ sandbox: response.data, currentModule });
116119
} catch (e) {
117120
this.setState({ notFound: true });

0 commit comments

Comments
 (0)