       packet = JSON.parse packet
       @props.updateBattleDetail packet
       @setState
-        selectedTimestamp: 0
+        selectedPacket: packet
     finally
       window.showModal
         title: __ "Paste Data"


OptionArea = React.createClass
  getInitialState: ->
    selectedTimestamp: 0
  shouldComponentUpdate: (nextProps, nextState) ->
    return true if @state.selectedTimestamp != nextState.selectedTimestamp
    return false if @props.battlePacketsNonce == nextProps.battlePacketsNonce
    return true


    return if index is NaN
    if index == -1
      packet = @props.battlePackets[0]
      @props.toggleAutoShow true
    else
      packet = @props.battlePackets[index]
      @props.toggleAutoShow false

    @setState
      selectedPacket: packet
    @props.updateBattleDetail packet

  handleClickExport: ->
