loaded releases in modal (basic view)

merge-requests/84/head
Jayasanka 6 years ago
parent 9843e6f0e2
commit 9dc007c1da

@ -1,5 +1,5 @@
import React from "react";
import {Modal, Typography} from 'antd';
import {Modal, Typography,List, Avatar} from 'antd';
import {connect} from 'react-redux';
// connecting state.releaseView with the component
@ -17,6 +17,7 @@ class ConnectedReleaseModal extends React.Component {
app: null
};
}
componentWillReceiveProps(nextProps) {
if (nextProps !== this.props) {
this.setState({
@ -46,19 +47,29 @@ class ConnectedReleaseModal extends React.Component {
render() {
if (this.props.releaseView.app != null) {
const app = this.props.app;
const app = this.props.releaseView.app;
return (
<div>
<Modal
title={app.title}
title={app.name}
visible={this.state.visible}
onOk={this.handleOk}
onCancel={this.handleCancel}
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
<List
itemLayout="horizontal"
dataSource={app.applicationReleases}
renderItem={item => (
<List.Item>
<List.Item.Meta
avatar={<Avatar src={item.iconPath} />}
title={<a href="https://ant.design">Title</a>}
description={item.description}
/>
</List.Item>
)}
/>
</Modal>
</div>
);

Loading…
Cancel
Save