import React from "react";
import { FlexAJ, AlignCenter } from "../../forums/css/layout";
import "./select_title.scss";
import Drop from "../../forums/Component/ItemDropDown";
import { Link } from "react-router-dom";
function replies_memos({ memos }) {
  return (
    <ul className="forumList">
      {memos.map((item, key) => {
        return (
          <li key={key}>
            <FlexAJ>
              <AlignCenter>
                <span className="color-gray-8">评论文章：</span>
                <Link to={`/forums/${item.id}/detail`} className="grey-3 task-hide" style={{ maxWidth: "700px" }}>{item.subject}</Link>
              </AlignCenter>
              <Drop />
            </FlexAJ>

            <FlexAJ className="mt8">
              {item && item.new_reply && (
                <div>
                  <div>{item.new_reply.content}</div>
                  <div className="mt8 color-gray-8 font-12">
                    {item.new_reply.published_time}
                  </div>
                </div>
              )}
              <Link to={`/forums/${item.id}/detail`} className="reply-link">查看</Link>
            </FlexAJ>
          </li>
        );
      })}
    </ul>
  );
}
export default replies_memos;
