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 EduExperienceItem extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    const {
      edu_bg,
      edu_category,
      begin_on,
      end_on,
      school,
      major,
    } = this.props.data;
    return (
      <div className="clearfix mt25">
        <div style={{ background: "#ffffff" }}>
          <div style={{ display: "flex" }}>
            <p style={{ color: "#888888", width: "15%" }}>
              {dateSplit(begin_on)}——{dateSplit(end_on)}
            </p>
            <p style={{ color: "#333333", marginLeft: 120, width: "10%" }}>
              {school}
            </p>
            <p style={{ color: "#333333", marginLeft: 120, width: "10%" }}>
              {major}
            </p>
            <p style={{ color: "#333333", marginLeft: 120, width: "10%" }}>
              {edu_bg}
            </p>
            <p style={{ color: "#333333", marginLeft: 120, width: "10%" }}>
              {edu_category}
            </p>
          </div>
        </div>
      </div>
    );
  }
}

export default EduExperienceItem;
