This commit is contained in:
zwjamnsss 2017-07-12 11:43:04 +08:00
parent c1b3107e65
commit c774df54d2
3 changed files with 1 additions and 48 deletions

View File

@ -1,47 +0,0 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { Card } from 'antd'
import {
fetchGroupList,
fetchCurrGroup
} from '../../actions/group.js'
import './GroupList.scss'
@connect(
state => ({
groupList: state.group.groupList,
currGroup: state.group.currGroup,
}),
{
fetchGroupList,
fetchCurrGroup
}
)
export default class GroupList extends Component {
constructor(props) {
super(props)
}
static propTypes = {
groupList: PropTypes.array,
currGroup: PropTypes.string
}
render () {
const { groupList, currGroup } = this.props;
return (
<Card title="Groups">
<div>{currGroup}</div>
{
groupList.map((group, index) => (
<div key={index}>{group}</div>
))
}
</Card>
)
}
}

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import GroupList from '../../components/GroupList/GroupList.js';
import GroupList from './GroupList/GroupList.js';
import ProjectList from './ProjectList';
import { Row, Col } from 'antd';