|
@@ -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);
|