import React from "react"; import PropTypes from "prop-types"; import { formatDate } from "../../util/helpers/dateHelpers"; import { CANDIDATES_PAGE } from "../../constants/pages"; const CandidateCard = ({ candidate, className, history }) => { const navigateToDetailsPage = () => { history.push({ pathname: CANDIDATES_PAGE + "/" + candidate.applicantId, }); }; return candidate == null ? (

) : (

{formatDate(candidate.dateOfApplication)}

{candidate.firstName} {candidate.lastName}

{candidate.experience === 0 ? "No experience" : candidate.experience + "+ years of experience"}

{candidate.technologyApplicants.map((technology, index) => (

{technology.name}

))}
{candidate.technologyApplicants.map((technology, index) => (
{technology.technology.name}
))}
CV {candidate.firstName} {candidate.lastName}.pdf
); }; CandidateCard.propTypes = { candidate: PropTypes.object, className: PropTypes.any, history: PropTypes.shape({ replace: PropTypes.func, push: PropTypes.func, location: PropTypes.shape({ pathname: PropTypes.string, }), }), }; export default CandidateCard;