mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
none
This commit is contained in:
parent
c1b3107e65
commit
c774df54d2
@ -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>
|
||||
)
|
||||
}
|
||||
}
|
@ -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';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user