{"size": 1603, "ext": "js", "max_stars_repo_path": "src/components/Main_UI/CompanyMain.js", "max_stars_repo_name": "hutchcrowley/FrontEnd-Two", "max_stars_repo_stars_event_min_datetime": "2020-01-30T14:27:59.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-30T14:27:59.000Z", "max_issues_repo_path": "src/components/Main_UI/CompanyMain.js", "max_issues_repo_name": "hutchcrowley/FrontEnd-Two", "max_issues_repo_issues_event_min_datetime": "2020-02-05T11:40:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-15T20:01:54.000Z", "max_forks_repo_path": "src/components/Main_UI/CompanyMain.js", "max_forks_repo_name": "hutchcrowley/FrontEnd-Two", "max_forks_repo_forks_event_min_datetime": "2020-01-29T23:19:50.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-15T09:06:25.000Z"}
{"max_stars_count": 1, "max_issues_count": 23, "max_forks_count": 2, "avg_line_length": 26.7166666667, "max_line_length": 71, "alphanum_fraction": 0.4772301934}
import React, { useState, useEffect } from "react";
import Spinner from "../Utility/Spinner";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { getSeekers } from "../../Redux/actions/seekers";

const CompanyMainUI = ({ seekers, getSeekers, isLoading }) => {
  useEffect(() => {
    getSeekers();
  }, []);

  const ID = localStorage.getItem("userid");

  return (
    <div className="main-ui-container">
      {!isLoading ? (
        <>
          <nav>
            <h3>Droom</h3>
            <div>
              <Link to="/companyprofilepage">Profile</Link>
              <Link to="/companymatchespage">Matches</Link>
              <Link to="/">Log Out</Link>
            </div>
          </nav>

          <div className="company-main-ui">
            <h1>Find Employees</h1>
            <div className="jobs">
              {seekers.map(seekers => {
                return (
                  <div key={seekers.id} className="job-card">
                    <h1>{seekers.name}</h1>
                    <h2>{seekers.location}</h2>
                    <div>
                      <button value={seekers.id}>X</button>
                      <button value={seekers.id}>Save</button>
                    </div>
                  </div>
                );
              })}
            </div>
          </div>
        </>
      ) : (
        <Spinner />
      )}
    </div>
  );
};

const mapStateToProps = state => {
  return {
    seekers: state.seekers,
    isLoading: state.isLoading
  };
};

export default connect(mapStateToProps, { getSeekers })(CompanyMainUI);
