You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
701 B
27 lines
701 B
import React, { Component } from "react"; |
|
import { connect } from "react-redux"; |
|
import { Card } from "semantic-ui-react"; |
|
|
|
class ClientProfile extends Component { |
|
render() { |
|
const { selfUser } = this.props; |
|
return <ClientProfileView user={selfUser} />; |
|
} |
|
} |
|
|
|
function mapStateToProps(state) { |
|
return { ...state.user }; |
|
} |
|
|
|
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> |
|
); |
|
|
|
export default connect(mapStateToProps)(ClientProfile);
|
|
|