Update Dashboard.js
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@@ -7,26 +7,13 @@ import DashboardActions from './DashboardActions';
|
|||||||
import Experience from './Experience';
|
import Experience from './Experience';
|
||||||
import Education from './Education';
|
import Education from './Education';
|
||||||
import { getCurrentProfile, deleteAccount } from '../../actions/profile';
|
import { getCurrentProfile, deleteAccount } from '../../actions/profile';
|
||||||
=======
|
|
||||||
import React, { useEffect } from "react";
|
|
||||||
import { Link } from "react-router-dom";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import DashboardActions from "./DashboardActions";
|
|
||||||
import Experience from "./Experience";
|
|
||||||
import Education from "./Education";
|
|
||||||
import { getCurrentProfile, deleteAccount } from "../../actions/profile";
|
|
||||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
|
||||||
|
|
||||||
const Dashboard = ({
|
const Dashboard = ({
|
||||||
getCurrentProfile,
|
getCurrentProfile,
|
||||||
deleteAccount,
|
deleteAccount,
|
||||||
auth: { user },
|
auth: { user },
|
||||||
<<<<<<< HEAD
|
|
||||||
profile: { profile }
|
profile: { profile }
|
||||||
=======
|
|
||||||
profile: { profile },
|
|
||||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
|
||||||
}) => {
|
}) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCurrentProfile();
|
getCurrentProfile();
|
||||||
@@ -66,20 +53,12 @@ Dashboard.propTypes = {
|
|||||||
getCurrentProfile: PropTypes.func.isRequired,
|
getCurrentProfile: PropTypes.func.isRequired,
|
||||||
deleteAccount: PropTypes.func.isRequired,
|
deleteAccount: PropTypes.func.isRequired,
|
||||||
auth: PropTypes.object.isRequired,
|
auth: PropTypes.object.isRequired,
|
||||||
<<<<<<< HEAD
|
|
||||||
profile: PropTypes.object.isRequired
|
|
||||||
=======
|
|
||||||
profile: PropTypes.object.isRequired,
|
profile: PropTypes.object.isRequired,
|
||||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => ({
|
const mapStateToProps = (state) => ({
|
||||||
auth: state.auth,
|
auth: state.auth,
|
||||||
<<<<<<< HEAD
|
|
||||||
profile: state.profile
|
|
||||||
=======
|
|
||||||
profile: state.profile,
|
profile: state.profile,
|
||||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps, { getCurrentProfile, deleteAccount })(
|
export default connect(mapStateToProps, { getCurrentProfile, deleteAccount })(
|
||||||
|
|||||||
Reference in New Issue
Block a user