import React, { Component } from "react";
import { Tabs, Divider } from "antd";
const dateSplit = (date) => {
  if (!date) {
    return "";
  } else {
    const dateArr = date.split("-");
    return `${dateArr[0]}.${dateArr[1]}`;
  }
};
class WorkExperience extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    const { company, begin_on, end_on, desc } = this.props.data;
    return (
      <div className="clearfix mt25">
        <div style={{ background: "#ffffff" }}>
          <div style={{ display: "flex" }}>
            <p style={{ color: "#888888" }}>
              {dateSplit(begin_on)}——{dateSplit(end_on)}
            </p>
            <p style={{ color: "#333333", marginLeft: 120, fontWeight: "700" }}>
              {company}
            </p>
          </div>

          <div style={{ display: "flex", marginTop: 30 }}>
            <p style={{ color: "#888888" }}>工作描述：</p>
          </div>
          <div
            style={{
              color: "#333333",
              marginTop: 15,
              whiteSpace: "pre-wrap",
              lineHeight: "2",
            }}
          >
            {desc}
          </div>
        </div>
      </div>
    );
  }
}

export default WorkExperience;
