import React, { useCallback } from "react";
import Modal from "../util/Modal";
import { CenterBtnGrp, OkBtn, CancelBtn } from "../util/GeneralButton";
import styled from "styled-components";

const Tip = styled.div`
  font-size: 16px;
  margin: 40px auto;
  text-align: center;
`;

export default ({ onCancel, history, jobId, ...props }) => {
  const onOk = useCallback(() => {
    onCancel();
    history.push(`/recruitment/jobdetail/addresume/${jobId}`);
  }, []);
  return (
    <Modal title="提示" {...props} getContainer={false}>
      <Tip>你没有简历，是否前往创建简历？</Tip>
      <CenterBtnGrp>
        <CancelBtn onClick={onCancel} />
        <OkBtn onClick={onOk} />
      </CenterBtnGrp>
    </Modal>
  );
};
