import React from 'react'; import { AppRegistry, View, Image } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux' // import {} from './../../../actions' import axios from 'axios'; import { userChangeRequest } from '../../../actions/userFields/changeEmail' import {passwordChangeRequest} from '../../../actions/userFields/changePassword' import ChangeLogin from './LoginFild'; import ChangePassword from './PasswordFields' // redux-connected container class profilePage extends React.Component { state = { files: null, photo: null } change = e => { const reader = new FileReader(); const file = e.target.files[0]; this.setState({ file }); reader.onloadend = () => { this.setState({ photo: reader.result }); }; reader.readAsDataURL(file); }; post = () => { const file = new FormData(); file.append("profilePhoto", this.state.file); }; lol = () => { const { user: { data: { id } }, userChangeRequest } = this.props; userChangeRequest({ id, login: "lol wtf" }) } render() { const { user:{data}, userChangeRequest,passwordChangeRequest } = this.props; // console.log('User', user); // console.log('Props', this.props); // console.log('State', this.state); return (
{user.login}
*/}{data.description}
{new Date(data.createdAt).toLocaleString()}
{ data.comments && data.comments .slice(0, 60) .map(el =>