class Profile extends Component {
state = {
isOpen: false
}
render () {
console.log(this.props.userss[0].name);
(this.props.userss[0].name === "") ? console.log('не судьба') : this.state.isOpen=true;
const body = this.state.isOpen &&
<div>
<div>Name</div>
<h3>
{this.props.userss[0].name}
</h3>
<div>Number</div>
<h3>
{this.props.userss[0].number}
</h3>
<div>Login</div>
<h3>
{this.props.userss[0].login}
</h3>
<div>Karma</div>
<h3>
{this.props.userss[0].karma>0 ? "true" : "false" }
</h3>
<div>Rating</div>
<h3>
{this.props.userss[0].rating}
</h3>
</div>;
return (
<div>
{body}
</div>
)
}
}
export default Profile