Skip to content

Commit 2c99a7c

Browse files
author
Ives van Hoorne
committed
Rename sandbox to Untitled
1 parent 9791f3c commit 2c99a7c

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

src/app/pages/Sandbox/Editor/Content/subviews/CodeEditor/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ export default class CodeEditor extends React.PureComponent {
253253
};
254254

255255
handleSaveCode = async () => {
256-
console.log('nog een keer');
257256
const { saveCode, preferences } = this.props;
258257
if (preferences.prettifyOnSaveEnabled) {
259258
await this.prettify();

src/app/pages/Sandbox/Editor/Workspace/SandboxDetails/SandboxTitle.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ export default class SandboxTitle extends React.PureComponent {
8383
};
8484

8585
handleRename = () => {
86+
const { title } = this.props;
8687
const { newTitle } = this.state;
87-
88-
this.props.renameSandbox(newTitle);
88+
if (newTitle !== title) {
89+
this.props.renameSandbox(newTitle);
90+
}
8991

9092
this.setState({
9193
editing: false,

src/app/pages/Sandbox/Editor/Workspace/SandboxDetails/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default class SandboxDetails extends React.PureComponent {
5353
<div>
5454
<SandboxTitle
5555
renameSandbox={this.renameSandbox}
56-
title={sandbox.title || sandbox.id}
56+
title={sandbox.title || 'Untitled'}
5757
/>
5858
{sandbox.forkedFromSandbox &&
5959
<ForkText>

src/app/pages/Sandbox/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import React from 'react';
33
import { bindActionCreators } from 'redux';
44
import { connect } from 'react-redux';
5-
import { Route, Switch } from 'react-router-dom';
65
import { createSelector } from 'reselect';
76
import { denormalize } from 'normalizr';
87
import sandboxEntity from 'app/store/entities/sandboxes/entity';
@@ -93,13 +92,7 @@ class SandboxPage extends React.PureComponent {
9392

9493
return (
9594
<Centered horizontal vertical>
96-
<Switch>
97-
<Route
98-
render={matchParams => (
99-
<Editor sandbox={sandbox} {...matchParams} />
100-
)}
101-
/>
102-
</Switch>
95+
<Editor sandbox={sandbox} />
10396
</Centered>
10497
);
10598
}

src/app/store/entities/sandboxes/actions.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ const forkSandbox = (id: string) => async (
112112
dispatch: Function,
113113
getState: Function
114114
) => {
115-
console.log('asking for a friend');
116115
const { data } = await dispatch(
117116
doRequest(FORK_SANDBOX_API_ACTIONS, `sandboxes/${id}/fork`, {
118117
method: 'POST',
@@ -266,7 +265,6 @@ export default {
266265
dispatch: Function,
267266
getState: Function
268267
) => {
269-
console.log('Called');
270268
const module = modulesSelector(getState())[moduleId];
271269
const sandboxId = await dispatch(maybeForkSandbox(id));
272270

0 commit comments

Comments
 (0)