2017-09-21 21:01:49 +00:00
|
|
|
import React, { Component } from "react";
|
|
|
|
import { connect } from "react-redux";
|
2017-09-22 02:39:58 +00:00
|
|
|
import { Card } from "semantic-ui-react";
|
2017-09-21 21:40:46 +00:00
|
|
|
|
2017-09-21 21:01:49 +00:00
|
|
|
class ClientProfile extends Component {
|
|
|
|
render() {
|
|
|
|
const { selfUser } = this.props;
|
2017-09-22 02:39:58 +00:00
|
|
|
return <ClientProfileView user={selfUser} />;
|
2017-09-21 21:01:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function mapStateToProps(state) {
|
|
|
|
return { ...state.user };
|
|
|
|
}
|
|
|
|
|
2017-09-22 02:39:58 +00:00
|
|
|
const ClientProfileView = ({ user }) => (
|
|
|
|
<Card fluid={true}>
|
|
|
|
<Card.Content>
|
|
|
|
<Card.Header>Client Information</Card.Header>
|
|
|
|
{user.client &&
|
|
|
|
user.client.business_number &&
|
|
|
|
<Card.Meta>Business Number: {user.client.business_number}</Card.Meta>}
|
|
|
|
</Card.Content>
|
|
|
|
</Card>
|
2017-09-21 21:01:49 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(ClientProfile);
|