Skip to content

Commit a820c0c

Browse files
fn-faisalfaisal154
andauthored
Before navigating away prompt user (#411)
* no description for sub folders. * sub folder context menu * navigating away from cloudcode * cloud code navigating away Co-authored-by: Faisal Nadeem <[email protected]>
1 parent 4f691f2 commit a820c0c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dashboard/Data/CloudCode/B4ACloudCode.react.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* the root directory of this source tree.
77
*/
88
import React from 'react';
9-
import { withRouter } from 'react-router';
9+
import { withRouter, Prompt } from 'react-router';
1010
import history from 'dashboard/history';
1111
import $ from 'jquery';
1212
import axios from 'axios';
@@ -327,6 +327,10 @@ class B4ACloudCode extends CloudCode {
327327

328328
return (
329329
<div className={`${styles.source} ${styles['b4a-source']}`} >
330+
<Prompt
331+
when={this.state.codeUpdated === true}
332+
message='Your cloud code changes may be lost. Please DEPLOY your changes before closing cloud code.'
333+
/>
330334
{title}
331335
{alertWhatIs}
332336
{content}

0 commit comments

Comments
 (0)