From 01e5e301738a3bf53f780bad8774f6b2bf8512df Mon Sep 17 00:00:00 2001 From: Farheen99 Date: Thu, 12 Nov 2020 10:01:58 +0530 Subject: [PATCH] Remove added setState method in componentDidMount --- .../Apps/scenes/Release/components/LifeCycle/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/LifeCycle/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/LifeCycle/index.js index 5660802b5ac..03c7801ac36 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/LifeCycle/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/LifeCycle/index.js @@ -87,15 +87,13 @@ class LifeCycle extends React.Component { const lifecycleSteps = Object.keys(lifeCycleConfig).map(config => { return lifeCycleConfig[config]; }); + let isPublished = this.checkReleaseLifeCycleStatus(); this.setState({ current: lifeCycleConfig[this.props.currentStatus].step, lifecycleSteps, + isPublished, }); this.getLifeCycleHistory(); - - this.setState({ - isPublished: this.checkReleaseLifeCycleStatus(), - }); } componentDidUpdate(prevProps, prevState, snapshot) {