2017-07-12 10:17:57 +08:00
|
|
|
import React, { Component } from 'react';
|
2017-07-12 11:43:04 +08:00
|
|
|
import GroupList from './GroupList/GroupList.js';
|
2017-07-19 20:59:59 +08:00
|
|
|
import ProjectList from './ProjectList/ProjectList.js';
|
2017-08-08 15:24:26 +08:00
|
|
|
import Subnav from '../../components/Subnav/Subnav.js';
|
2017-08-11 15:02:07 +08:00
|
|
|
import { Route, Switch, Redirect } from 'react-router-dom';
|
2017-07-12 10:17:57 +08:00
|
|
|
import { Row, Col } from 'antd';
|
2017-07-06 17:47:27 +08:00
|
|
|
|
2017-08-10 16:00:52 +08:00
|
|
|
import './Group.scss'
|
2017-07-11 14:37:20 +08:00
|
|
|
|
2017-08-10 16:00:52 +08:00
|
|
|
export default class Group extends Component {
|
2017-07-10 20:26:49 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2017-08-11 15:02:07 +08:00
|
|
|
|
|
|
|
const GroupContent = (
|
|
|
|
<div className="g-row">
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Col span={6}>
|
|
|
|
<GroupList></GroupList>
|
|
|
|
</Col>
|
|
|
|
<Col span={18}>
|
|
|
|
<ProjectList/>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</div>
|
|
|
|
)
|
2017-07-10 20:26:49 +08:00
|
|
|
return (
|
2017-08-08 15:24:26 +08:00
|
|
|
<div>
|
2017-08-08 16:21:32 +08:00
|
|
|
<Subnav
|
|
|
|
default={'项目广场'}
|
|
|
|
data={[{
|
|
|
|
name: '项目广场',
|
|
|
|
path: '/group'
|
|
|
|
}, {
|
|
|
|
name: '我的关注',
|
|
|
|
path: '/follow'
|
|
|
|
}]}/>
|
2017-08-11 15:02:07 +08:00
|
|
|
<Switch>
|
|
|
|
<Redirect exact from='/group' to='/group/0' />
|
|
|
|
<Route path="/group/:groupId" render={() => GroupContent} />
|
|
|
|
</Switch>
|
2017-07-10 20:26:49 +08:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|