import React, { Component } from "react"; import { connect } from "react-redux"; import { Link } from "react-router-dom"; import { Card, Button, Label } from "semantic-ui-react"; import { deleteWorktypeRequest } from "../../../actions/worktype/saga.actions"; class ClientProfile extends Component { deleteWorkType = uuid => { this.props.dispatch(deleteWorktypeRequest(uuid)); }; render() { const { selfUser } = this.props; return ( ); } } function mapStateToProps(state) { return { ...state.user }; } const ClientProfileView = ({ user, deleteWorkType }) => (
Client Information Business Number: {user.client.business_number} {(user.client.work_types || []).filter(worktype => !worktype.deleted) .length > 0 && {user.client.work_types .filter(worktype => !worktype.deleted) .map((worktype, index) => ( Worktype ))} }
); export default connect(mapStateToProps)(ClientProfile);