yapi/client/containers/User/User.js

45 lines
964 B
JavaScript
Raw Normal View History

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-07-17 11:01:05 +08:00
import LeftMenu from './LeftMenu.js'
import List from './List.js'
import PropTypes from 'prop-types'
import Profile from './Profile.js'
2017-07-27 14:35:27 +08:00
import { Row, Col } from 'antd';
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-07-27 14:35:27 +08:00
<div className="g-doc">
<Row gutter={16} className="user-box">
<Col span={6}>
<LeftMenu />
</Col>
<Col span={18}>
<Route path={this.props.match.path + '/list'} component={List} />
<Route path={this.props.match.path + '/profile/:uid'} component={Profile} />
</Col>
</Row>
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