2017-08-11 19:30:12 +08:00
|
|
|
import './ProjectCard.scss';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { Card, Icon } from 'antd';
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
import PropTypes from 'prop-types';
|
2017-08-10 15:36:35 +08:00
|
|
|
|
2017-08-11 17:47:25 +08:00
|
|
|
class ProjectCard extends Component {
|
2017-08-10 15:36:35 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
static propTypes = {
|
2017-08-11 19:30:12 +08:00
|
|
|
projectData: PropTypes.object
|
2017-08-10 15:36:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2017-08-11 19:30:12 +08:00
|
|
|
const { projectData } = this.props;
|
|
|
|
console.log(projectData);
|
2017-08-10 15:36:35 +08:00
|
|
|
return (
|
2017-08-11 19:30:12 +08:00
|
|
|
<Link to={`/project/${projectData._id}`}>
|
|
|
|
<Card bordered={false} bodyStyle={{padding: 16}} className="m-card">
|
|
|
|
<div className="m-card-logo">
|
|
|
|
<Icon type="area-chart" className="icon" />
|
|
|
|
<p className="name">{projectData.name}</p>
|
|
|
|
</div>
|
|
|
|
<div className="m-card-btns" style={{display: 'none'}}>btns</div>
|
|
|
|
</Card>
|
|
|
|
</Link>
|
2017-08-10 15:36:35 +08:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-08-11 17:47:25 +08:00
|
|
|
export default ProjectCard
|