Skip to content

Commit ee896c7

Browse files
author
Ives van Hoorne
committed
Fork own sandbox confirm
1 parent feface5 commit ee896c7

File tree

2 files changed

+7
-100
lines changed

2 files changed

+7
-100
lines changed

src/app/pages/SandboxView/Sandbox/Editor/Content/Header/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@ export default class Header extends React.PureComponent {
110110

111111
forkSandbox = () => {
112112
const { sandbox, sandboxActions } = this.props;
113-
sandboxActions.forkSandbox(sandbox.id);
113+
114+
const shouldFork = sandbox.owned
115+
? confirm('Do you want to fork your own sandbox?')
116+
: true;
117+
if (shouldFork) {
118+
sandboxActions.forkSandbox(sandbox.id);
119+
}
114120
};
115121

116122
setEditorView = () => {

src/app/pages/SandboxView/Sandbox/Editor/HeaderActions.js

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)