const React = require('react') const {dispatch, dispatcher} = require('../lib/dispatcher') module.exports = class OpenTorrentAddressModal extends React.Component { render () { // TODO: dcposch remove janky inline ) } } function handleKeyPress (e) { if (e.which === 13) handleOK() /* hit Enter to submit */ } function handleOK () { dispatch('exitModal') // TODO: dcposch use React refs instead dispatch('addTorrent', document.querySelector('#add-torrent-url').value) }