File indexing completed on 2025-01-26 05:27:59
0001 import React, { Component } from 'react'; 0002 0003 class CommentsContainer extends React.Component { 0004 render(){ 0005 let commentsContainer; 0006 if (this.props.comments){ 0007 const comments = this.props.comments.map((cm,index) => ( 0008 <li key={index}> 0009 <div className="cm-content"> 0010 <span className="cm-userinfo"> 0011 <img src={cm.profile_image_url}/> 0012 <span className="username"><a href={this.props.baseUrlStore+"/member/"+cm.member_id}>{cm.username}</a></span> 0013 </span> 0014 <a className="title" href={this.props.baseUrlStore+"/p/"+cm.comment_target_id+(this.props.type && this.props.type=='moderation' ?'#tab-moderation':'')}>{cm.title}</a> 0015 <span className="content"> 0016 {cm.comment_text} 0017 </span> 0018 <span className="info-row"> 0019 <span className="date"> 0020 {cm.comment_created_at} 0021 0022 </span> 0023 </span> 0024 </div> 0025 </li> 0026 )); 0027 commentsContainer = <ul>{comments}</ul> 0028 } 0029 return ( 0030 <div className="panelContainer"> 0031 <div className="title">{this.props.title}</div> 0032 {commentsContainer} 0033 </div> 0034 ) 0035 } 0036 } 0037 0038 export default CommentsContainer;