|
@@ -1,6 +1,6 @@
|
|
|
import React from 'react';
|
|
|
import { connect } from 'react-redux';
|
|
|
-import { bindActionCreators } from 'redux'
|
|
|
+// import { bindActionCreators } from 'redux'
|
|
|
// import {} from './../../../actions'
|
|
|
import axios from 'axios';
|
|
|
|
|
@@ -34,13 +34,11 @@ class profilePage extends React.Component {
|
|
|
return (
|
|
|
<div className="page page--bottom-only profile-page">
|
|
|
<section className="container section section--about">
|
|
|
- <h2 className="section__element section__element--">{user.name}</h2>
|
|
|
- <div className="section__element--combined">
|
|
|
- <img src={user.avatar} alt="avatar"/>
|
|
|
- <div>
|
|
|
- <h3>Login</h3>
|
|
|
- <p>{user.login}<button className="link link--btn right">Change login</button></p>
|
|
|
- </div>
|
|
|
+ <h2 className="section__element section__element--header">{user.name}</h2>
|
|
|
+ <img className="section__element section__element--image" src={user.avatar} alt="avatar" />
|
|
|
+ <div className="sedtion__element section__element--login">
|
|
|
+ <h3>Login</h3>
|
|
|
+ <p>{user.login}<button className="link link--btn right">Change login</button></p>
|
|
|
</div>
|
|
|
<div className="section__element section__element--">
|
|
|
<h3>E-mail</h3>
|
|
@@ -62,11 +60,11 @@ class profilePage extends React.Component {
|
|
|
{
|
|
|
user.comments && user.comments
|
|
|
.slice(0, 60)
|
|
|
- .map(el =>
|
|
|
- <p>
|
|
|
- <h4>{new Date(el.createdAt).toLocaleString()}</h4>
|
|
|
- {el.text}
|
|
|
- </p>)
|
|
|
+ .map(el =>
|
|
|
+ <p>
|
|
|
+ <h4>{new Date(el.createdAt).toLocaleString()}</h4>
|
|
|
+ {el.text}
|
|
|
+ </p>)
|
|
|
}
|
|
|
</p>
|
|
|
</div>
|
|
@@ -80,8 +78,8 @@ class profilePage extends React.Component {
|
|
|
const
|
|
|
mapStateToProps = state => ({
|
|
|
user: state.user
|
|
|
- }),
|
|
|
- mapDispatchToProps = dispatch => bindActionCreators({}, dispatch)
|
|
|
+ })
|
|
|
+// mapDispatchToProps = dispatch => bindActionCreators({}, dispatch)
|
|
|
|
|
|
export default connect(mapStateToProps)(profilePage);
|
|
|
|