import { inject, observer } from "mobx-react";
import "./right.less";
import { Store } from "antd/es/form/interface";
import { useEffect, useState } from "react";
const Pyzx = (props: Store) => {
  const { homeStore } = props;
  const [user, setUser] = useState<any>();
  useEffect(() => {
    homeStore.getAe().then((res) => {
      setUser(res.data?.record);
    });
  }, [homeStore]);

  return (
    <div className="pyzx">
      {user?.map((item) => {
        return (
          <div key={item.id} className="pyzx_title">
            <img
              height={80}
              src={item.head_img}
              alt=""
            />
            <div className="content">
              <div>姓名:{item.user_name}</div>
              <div>总积分:{item.scores}</div>
              <div>职位:{item.pos_held}</div>
              <div>自我描述:{item.remark}</div>
            </div>
          </div>
        );
      })}
    </div>
  );
};

export default inject("homeStore")(observer(Pyzx));
