Browse Source

change profile page

Tanya Sashyna 5 years ago
parent
commit
e929f0d589
1 changed files with 14 additions and 1 deletions
  1. 14 1
      src/conteiners/profile/Profile.js

+ 14 - 1
src/conteiners/profile/Profile.js

@@ -1,11 +1,14 @@
 import React from 'react';
+import { connect } from "react-redux";
 
 import './profile.scss';
 
 import Sidebar from '../../components/sidebar/Sidebar';
 
-export default class Profile extends React.Component {
+export class Profile extends React.Component {
     render() {
+	const {user} = this.props;
+	console.log(user);
         return (
             <>
                 <Sidebar/>
@@ -18,3 +21,13 @@ export default class Profile extends React.Component {
         )
     }
 }
+
+const mapStateToProps = state => {
+    return {
+        user: state.login.user
+    };
+};
+
+export default connect(
+    mapStateToProps
+)(Profile);