import React from 'react';
import moment from 'moment';
import Loading from '/imports/ui/loading';

class _Component extends React.Component {
  render() {
    const notice = this.props.data;
    return (
      this.props.ready ?
        <div style={{padding: '20px'}}>
          <h4 className="ui brown header">{notice.title}</h4>
          {moment(notice.createdAt).format('MM月DD日')} <br/>
          {notice.content}
        </div>
        :
        <Loading/>
    );
  }
}

export default _Component;
