<commit_before>import React from 'react';
import { connect } from 'react-redux'
import { fetchTrips, showModal, fetchNotifications, deleteNotifications } from '../actions/index'
import UserTrips from '../components/UserTrips'
import NewTripForm from '../components/NewTripForm'
import NotificationSystem from 'react-notification-system'

const buttonStyle = {
    margin: 'auto',
    display: 'block',
    marginBottom: '20px',
    marginTop: '30px'
  }

class User extends React.Component {
  constructor(props) {
    super(props)
  }


  componentDidMount() {
    this._notificationSystem = this.refs.notificationSystem;
    this.props.fetchTrips(localStorage.getItem('user_id'), 'trips')
    this.props.fetchNotifications(localStorage.getItem('user_id'))

    setTimeout(() => {
      this.props.notifications.forEach((msg) => {
        this._notificationSystem.addNotification({
          message: `${msg.notification_message}`,
          level: 'success'
        })
      })
      this.props.deleteNotifications(localStorage.getItem('user_id'))
    }, 500);

  }


  openNewTripForm = () => {
    this.props.showModal(localStorage.getItem('user_id'))
  }

  closeNewTripForm = () => {
    this.props.showModal(null)
  }

  handleSubmit = (tripInfo) => {
    const tripPicList = ['http://i64.tinypic.com/2mq7wya.jpg',
                         'http://i64.tinypic.com/5dmipj.jpg',
                         'http://i64.tinypic.com/2i8c4za.jpg',                     
                         'http://i64.tinypic.com/2mq7wya.jpg',
                         'http://i65.tinypic.com/34i332x.jpg']

    let tripPic = tripPicList[Math.floor(Math.random()*tripPicList.length)];
    let user_id = localStorage.getItem('user_id')
<commit_msg>modal fix<commit_after>import React from 'react';
import { connect } from 'react-redux'
import { fetchTrips, showModal, fetchNotifications, deleteNotifications } from '../actions/index'
import UserTrips from '../components/UserTrips'
import NewTripForm from '../components/NewTripForm'
import NotificationSystem from 'react-notification-system'
import { Modal } from 'react-bootstrap'

const buttonStyle = {
    margin: 'auto',
    display: 'block',
    marginBottom: '20px',
    marginTop: '30px'
  }

class User extends React.Component {
  constructor(props) {
    super(props)
  }


  componentDidMount() {
    this._notificationSystem = this.refs.notificationSystem;
    this.props.fetchTrips(localStorage.getItem('user_id'), 'trips')
    this.props.fetchNotifications(localStorage.getItem('user_id'))

    setTimeout(() => {
      this.props.notifications.forEach((msg) => {
        this._notificationSystem.addNotification({
          message: `${msg.notification_message}`,
          level: 'success'
        })
      })
      this.props.deleteNotifications(localStorage.getItem('user_id'))
    }, 500);
  }

  openNewTripForm = () => {
    this.props.showModal(localStorage.getItem('user_id'))
  }

  closeNewTripForm = () => {
    this.props.showModal(null)
  }

  handleSubmit = (tripInfo) => {
    const tripPicList = ['http://i64.tinypic.com/2mq7wya.jpg',
                         'http://i64.tinypic.com/5dmipj.jpg',
                         'http://i64.tinypic.com/2i8c4za.jpg',                     
                         'http://i64.tinypic.com/2mq7wya.jpg',
                         'http://i65.tinypic.com/34i332x.jpg']

    let tripPic = tripPicList[Math.floor(Math.random()*tripPicList.length)];
    let user_id = localStorage.getItem('user_id')

{'fraction_non_alphanumeric': 0.1407766990291262, 'fraction_numerical': 0.017133066818960593, 'mean_word_length': 2.845225027442371, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4296171', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1103, 'n_words': 159}