2017-07-17 11:01:05 +08:00
|
|
|
import './index.scss'
|
|
|
|
import React, { Component } from 'react'
|
|
|
|
import { connect } from 'react-redux'
|
2017-07-24 10:59:17 +08:00
|
|
|
import { Route } from 'react-router-dom'
|
2017-08-10 21:20:23 +08:00
|
|
|
// import LeftMenu from './LeftMenu.js'
|
2017-07-17 11:01:05 +08:00
|
|
|
import List from './List.js'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
import Profile from './Profile.js'
|
2017-08-10 21:20:23 +08:00
|
|
|
import { Row } from 'antd';
|
|
|
|
import Subnav from '../../components/Subnav/Subnav.js';
|
2017-07-17 11:01:05 +08:00
|
|
|
@connect()
|
|
|
|
class User extends Component {
|
|
|
|
static propTypes = {
|
|
|
|
match: PropTypes.object
|
|
|
|
}
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount () {
|
|
|
|
console.log(this.props.match)
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2017-07-27 14:35:27 +08:00
|
|
|
|
|
|
|
|
2017-07-17 11:01:05 +08:00
|
|
|
return (
|
2017-08-10 21:20:23 +08:00
|
|
|
<div>
|
|
|
|
<Subnav
|
|
|
|
default={'我的关注'}
|
|
|
|
data={[{
|
|
|
|
name: '项目广场',
|
|
|
|
path: '/group'
|
|
|
|
}, {
|
|
|
|
name: '我的关注',
|
|
|
|
path: '/follow'
|
|
|
|
}]}/>
|
|
|
|
<div className="g-doc">
|
|
|
|
<Row gutter={16} className="user-box">
|
2017-07-27 14:35:27 +08:00
|
|
|
<Route path={this.props.match.path + '/list'} component={List} />
|
|
|
|
<Route path={this.props.match.path + '/profile/:uid'} component={Profile} />
|
2017-08-10 21:20:23 +08:00
|
|
|
</Row>
|
|
|
|
</div>
|
2017-07-17 11:01:05 +08:00
|
|
|
</div>
|
2017-07-27 14:35:27 +08:00
|
|
|
)
|
2017-07-17 11:01:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-27 14:35:27 +08:00
|
|
|
export default User
|