import React, { PropTypes } from 'react' import ReactDOM from 'react-dom' import store from '../store' import { unlockStatus, clearNewArticle } from '../actions' export default class EditedAlert extends React.Component { componentDidMount () { ReactDOM.findDOMNode(this.refs.no).focus() } handleNoButtonClick (e) { this.props.close() } handleYesButtonClick (e) { store.dispatch(unlockStatus()) store.dispatch(this.props.action) store.dispatch(clearNewArticle()) this.props.close() } render () { return (