File tree Expand file tree Collapse file tree 5 files changed +6
-14
lines changed
Content/subviews/CodeEditor Expand file tree Collapse file tree 5 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,6 @@ export default class CodeEditor extends React.PureComponent {
253
253
} ;
254
254
255
255
handleSaveCode = async ( ) => {
256
- console . log ( 'nog een keer' ) ;
257
256
const { saveCode, preferences } = this . props ;
258
257
if ( preferences . prettifyOnSaveEnabled ) {
259
258
await this . prettify ( ) ;
Original file line number Diff line number Diff line change @@ -83,9 +83,11 @@ export default class SandboxTitle extends React.PureComponent {
83
83
} ;
84
84
85
85
handleRename = ( ) => {
86
+ const { title } = this . props ;
86
87
const { newTitle } = this . state ;
87
-
88
- this . props . renameSandbox ( newTitle ) ;
88
+ if ( newTitle !== title ) {
89
+ this . props . renameSandbox ( newTitle ) ;
90
+ }
89
91
90
92
this . setState ( {
91
93
editing : false ,
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export default class SandboxDetails extends React.PureComponent {
53
53
< div >
54
54
< SandboxTitle
55
55
renameSandbox = { this . renameSandbox }
56
- title = { sandbox . title || sandbox . id }
56
+ title = { sandbox . title || 'Untitled' }
57
57
/>
58
58
{ sandbox . forkedFromSandbox &&
59
59
< ForkText >
Original file line number Diff line number Diff line change 2
2
import React from 'react' ;
3
3
import { bindActionCreators } from 'redux' ;
4
4
import { connect } from 'react-redux' ;
5
- import { Route , Switch } from 'react-router-dom' ;
6
5
import { createSelector } from 'reselect' ;
7
6
import { denormalize } from 'normalizr' ;
8
7
import sandboxEntity from 'app/store/entities/sandboxes/entity' ;
@@ -93,13 +92,7 @@ class SandboxPage extends React.PureComponent {
93
92
94
93
return (
95
94
< Centered horizontal vertical >
96
- < Switch >
97
- < Route
98
- render = { matchParams => (
99
- < Editor sandbox = { sandbox } { ...matchParams } />
100
- ) }
101
- />
102
- </ Switch >
95
+ < Editor sandbox = { sandbox } />
103
96
</ Centered >
104
97
) ;
105
98
}
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ const forkSandbox = (id: string) => async (
112
112
dispatch : Function ,
113
113
getState : Function
114
114
) => {
115
- console . log ( 'asking for a friend' ) ;
116
115
const { data } = await dispatch (
117
116
doRequest ( FORK_SANDBOX_API_ACTIONS , `sandboxes/${ id } /fork` , {
118
117
method : 'POST' ,
@@ -266,7 +265,6 @@ export default {
266
265
dispatch : Function ,
267
266
getState : Function
268
267
) => {
269
- console . log ( 'Called' ) ;
270
268
const module = modulesSelector ( getState ( ) ) [ moduleId ] ;
271
269
const sandboxId = await dispatch ( maybeForkSandbox ( id ) ) ;
272
270
You can’t perform that action at this time.
0 commit comments