import React from 'react';
import { Link } from 'react-router-dom';
import { AlignCenter } from '../../Component/layout';
import { TagInfo } from '../../Utils/TagColor';
import { getImageUrl } from 'educoder';

function Activity({list}) {
  return(
    <ul className="infosActivity">
      {
        list.map((i,k)=>{
          return(
            <li>
              <Link to={``}><img src={getImageUrl(`/system/lets/letter_avatars/2/D/169_162_140/120.png`)} alt="" className="aImg"/></Link>
              <div className="aInfos">
                <AlignCenter>
                  <Link to={``} className="name">{i.user_name}</Link>
                  <span className="time">{i.action_time}</span>
                  {i.priority && TagInfo(`${i.priority}`,"")}
                  {i.issue_status && <span className="status">{i.issue_status}</span> }
                </AlignCenter>
                <p className="aDesc">{i.action_type}：{i.name}</p>
              </div>
            </li>
          )
        })
      }
    </ul>
  )
}
export default Activity;