From 9dc007c1da2f807a369bee34157158139cd3b57e Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Tue, 30 Apr 2019 22:32:59 +0530 Subject: [PATCH] loaded releases in modal (basic view) --- .../src/components/apps/ReleaseModal.js | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/ReleaseModal.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/ReleaseModal.js index 04aa767abeb..cdce5b08384 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/ReleaseModal.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/ReleaseModal.js @@ -1,6 +1,6 @@ import React from "react"; -import {Modal, Typography} from 'antd'; -import { connect } from 'react-redux'; +import {Modal, Typography,List, Avatar} from 'antd'; +import {connect} from 'react-redux'; // connecting state.releaseView with the component const mapStateToProps = state => { @@ -17,10 +17,11 @@ class ConnectedReleaseModal extends React.Component { app: null }; } + componentWillReceiveProps(nextProps) { if (nextProps !== this.props) { this.setState({ - visible: nextProps.releaseView.visible, + visible: nextProps.releaseView.visible, app: nextProps.releaseView.app }) } @@ -45,29 +46,39 @@ class ConnectedReleaseModal extends React.Component { }; render() { - if(this.props.releaseView.app != null){ - const app = this.props.app; - + if (this.props.releaseView.app != null) { + const app = this.props.releaseView.app; return (

Some contents...

-

Some contents...

-

Some contents...

+ ( + + } + title={Title} + description={item.description} + /> + + )} + />
); - }else { + } else { return null; } } } -const ReleaseModal = connect(mapStateToProps,null)(ConnectedReleaseModal); +const ReleaseModal = connect(mapStateToProps, null)(ConnectedReleaseModal); export default ReleaseModal; \ No newline at end of file