<commit_before>import React from 'react';
import JoinEventButton from './JoinEventButton';
import moment from 'moment';

const UniqueEventView = (props) => {
  let button = null;
  if (props.editable) {
    button = (
      <div className="inline fields">
        <button
          className="editButton ui button"
          onClick={props.setEdit}
        >
          Quick edit
        </button>
      </div>
    );
  } else if (props.joinable) {
    button = (
      <JoinEventButton
        eventId={props.eventId} 
        contributions={props.contributions}
        handleJoinEventWithContributions={props.handleJoinEventWithContributions}
      />
    );
  }

  const dateTime = moment(props.date)
    .set({
      hour: props.time.split(':')[0],
      minute: props.time.split(':')[1],
    })
    .add(1, 'day'); // not sure why a day has to be added
    

  return (
    <div className="ui items">
      <div className="eventName ui item">
        <div className="ui large header">
          {props.eventName}
        </div>
      </div>

      <div className="eventHashtag ui item ">
        <h3><i className="instagram small icon"></i>Tag your pics with <span id="bigger">{props.hashtag} </span> to post them here.</h3>
      </div>

      <div className="date item">
        <div className="ui small header">
          <p>{dateTime.format('MMMM Do YYYY, h:mm:ss a')} at {moment(props.time, ['H:mm']).format('hh:mm A')}</p>
        </div>
      </div>

      <div className="location item"><i>
        {props.location}
      </i></div>

      <div className="description item">
        {props.description}
      </div>

      { button }
    </div>
  );
};

export default UniqueEventView;
<commit_msg>time no longer displays twice, no longer displays seconds<commit_after>import React from 'react';
import JoinEventButton from './JoinEventButton';
import moment from 'moment';

const UniqueEventView = (props) => {
  let button = null;
  if (props.editable) {
    button = (
      <div className="inline fields">
        <button
          className="editButton ui button"
          onClick={props.setEdit}
        >
          Quick edit
        </button>
      </div>
    );
  } else if (props.joinable) {
    button = (
      <JoinEventButton
        eventId={props.eventId} 
        contributions={props.contributions}
        handleJoinEventWithContributions={props.handleJoinEventWithContributions}
      />
    );
  }

  const dateTime = moment(props.date)
    .set({
      hour: props.time.split(':')[0],
      minute: props.time.split(':')[1],
    })
    .add(1, 'day'); // not sure why a day has to be added
    

  return (
    <div className="ui items">
      <div className="eventName ui item">
        <div className="ui large header">
          {props.eventName}
        </div>
      </div>

      <div className="eventHashtag ui item ">
        <h3><i className="instagram small icon"></i>Tag your pics with <span id="bigger">{props.hashtag} </span> to post them here.</h3>
      </div>

      <div className="date item">
        <div className="ui small header">
          <p>{dateTime.format('MMMM Do YYYY, h:mm a')}</p>
        </div>
      </div>

      <div className="location item"><i>
        {props.location}
      </i></div>

      <div className="description item">
        {props.description}
      </div>

      { button }
    </div>
  );
};

export default UniqueEventView;

{'fraction_non_alphanumeric': 0.14068226670425713, 'fraction_numerical': 0.00281928390188892, 'mean_word_length': 2.04549356223176, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3211371', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1042, 'n_words': 258}