|
@@ -1,4 +1,5 @@
|
|
|
import React from 'react';
|
|
|
+import { AppRegistry, View, Image } from 'react';
|
|
|
import { connect } from 'react-redux';
|
|
|
import { bindActionCreators } from 'redux'
|
|
|
// import {} from './../../../actions'
|
|
@@ -48,7 +49,7 @@ class profilePage extends React.Component {
|
|
|
|
|
|
|
|
|
render() {
|
|
|
- const { user, userChangeRequest } = this.props;
|
|
|
+ const { user:{data}, userChangeRequest,passwordChangeRequest } = this.props;
|
|
|
|
|
|
// console.log('User', user);
|
|
|
// console.log('Props', this.props);
|
|
@@ -57,33 +58,32 @@ class profilePage extends React.Component {
|
|
|
return (
|
|
|
<div className="page page--bottom-only profile-page">
|
|
|
<section className="container section section--about">
|
|
|
- <button onClick={this.lol}>adlkasjdakl</button>
|
|
|
- <h2 className="section__element section__element--header">{user.login}</h2>
|
|
|
- <img className="section__element section__element--image" src={user.avatar} alt="avatar" />
|
|
|
+ {/* <h2 className="section__element section__element--header">{data.login}</h2> */}
|
|
|
+
|
|
|
<div className="sedtion__element section__element--login">
|
|
|
- <h3>Login</h3>
|
|
|
+ <h3>Email</h3>
|
|
|
{/* <p>{user.login}<button className="link link--btn right" >Change login</button></p> */}
|
|
|
- <ChangeLogin className="link link--btn right" user={user} actions={{ userChangeRequest }}>{user.login}</ChangeLogin>
|
|
|
+ <ChangeLogin className="link link--btn right" data={data} actions={{ userChangeRequest }}>{data.login}</ChangeLogin>
|
|
|
</div>
|
|
|
<div className="section__element section__element--">
|
|
|
<h3>Password</h3>
|
|
|
- <ChangePassword className="link link--btn right" user={user} actions={{ passwordChangeRequest }}>{user.password}</ChangePassword>
|
|
|
+ <ChangePassword className="link link--btn right" data={data} actions={{ passwordChangeRequest }}>{data.password}</ChangePassword>
|
|
|
</div>
|
|
|
<div className="section__element section__element--">
|
|
|
<h3>Status</h3>
|
|
|
- <p>{user.description}</p>
|
|
|
+ <p>{data.description}</p>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section className="container section section--stats">
|
|
|
<div className="section__element section__element--">
|
|
|
<h3>Member Since</h3>
|
|
|
- <p>{new Date(user.createdAt).toLocaleString()}</p>
|
|
|
+ <p>{new Date(data.createdAt).toLocaleString()}</p>
|
|
|
</div>
|
|
|
<div className="section__element section__element--comments">
|
|
|
<h3>Last comments</h3>
|
|
|
<p className="comments-block">
|
|
|
{
|
|
|
- user.comments && user.comments
|
|
|
+ data.comments && data.comments
|
|
|
.slice(0, 60)
|
|
|
.map(el =>
|
|
|
<p>
|