{"size": 1449, "ext": "js", "max_stars_repo_path": "src/React/containers/StaticHeader.js", "max_stars_repo_name": "gauthamguna97/ReactRedux_basic", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/React/containers/StaticHeader.js", "max_issues_repo_name": "gauthamguna97/ReactRedux_basic", "max_issues_repo_issues_event_min_datetime": "2020-07-04T03:00:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-13T17:22:28.000Z", "max_forks_repo_path": "src/React/containers/StaticHeader.js", "max_forks_repo_name": "gauthamguna97/ReactRedux_basic", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 6, "max_forks_count": null, "avg_line_length": 31.5, "max_line_length": 159, "alphanum_fraction": 0.6238785369}
import React from "react";
import { connect } from "react-redux";
import { showTasks, addToTop, showAddTasks } from "../../Redux/actions";
import Menu from './DropDown';
import './staticheader.css';

const SHeader = (props) => {
  const { topData = {}, userData } = props;
  return (
    <div className="headerfix">
      <div className="burgeri" onClick={() => props.showSideMenuFn(true)}>
        <img src="https://cdn3.iconfinder.com/data/icons/mobile-banking-ver-4a/100/1-48-512.png" />
      </div>
      <div className="headerval mheading">Utilization</div>
      <div className="headersecondwrap">
        <div className="headersecond">
          <div className="headerval cname">
            <Menu />
          </div>
          <div
            className="ctask"
          >
            <img onClick={() => props.showAddTaskFn({ UserName: topData.name })} src="https://cdn3.iconfinder.com/data/icons/gradient-circle/36/5004-512.png"/>
          </div>
        </div>
      </div>
    </div>
  );
}

const mapStateToProps = (state) => {
  // console.log(state.activedata)
  return {
    topData: state.main.TopData,
    userData: state.main.userData,
  };
}

const mapDispatchToProps = (dispatch) => ({
  showTaskFn: (value) => dispatch(showTasks(value)),
  showAddTaskFn: (value) => dispatch(showAddTasks(value)),
  addToTopFn: (value) => dispatch(addToTop(value)),
});

export default connect(mapStateToProps, mapDispatchToProps)(SHeader);
