Skip to content

Commit 47bd585

Browse files
author
Ives van Hoorne
committed
Show codemirror editor for phones
1 parent b1043aa commit 47bd585

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"arrow-parens": 0,
1919
"import/prefer-default-export": 0,
2020
"class-methods-use-this": 0,
21-
"no-console": ["error", { "allow": ["error"] } ]
21+
"no-console": ["error", { "allow": ["error"] }],
22+
"prefer-template": "off"
2223
},
2324
"settings": {
2425
"import/resolver": {

src/app/pages/Sandbox/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ class SandboxPage extends React.PureComponent<Props, State> {
4747
window.screen.availWidth < 800 &&
4848
!document.location.search.includes('from-embed')
4949
) {
50-
document.location.href = document.location.href.replace('/s/', '/embed/');
50+
const addedSign = document.location.search ? '&' : '?';
51+
document.location.href =
52+
document.location.href.replace('/s/', '/embed/') +
53+
addedSign +
54+
'codemirror=1';
5155
} else {
5256
this.fetchSandbox(this.props.match.params.id);
5357
}

0 commit comments

Comments
 (0)