1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00

clean code

This commit is contained in:
Rokt33r
2016-05-03 15:41:11 +09:00
parent ea8e31561e
commit 10aae90ae2
15 changed files with 84 additions and 625 deletions

View File

@@ -1,7 +1,6 @@
import React, { PropTypes } from 'react'
import ReactDOM from 'react-dom'
import store from '../store'
import { destroyArticle } from '../actions'
const electron = require('electron')
const ipc = electron.ipcRenderer
@@ -10,7 +9,7 @@ export default class DeleteArticleModal extends React.Component {
constructor (props) {
super(props)
this.confirmHandler = e => this.handleYesButtonClick()
this.confirmHandler = (e) => this.handleYesButtonClick()
}
componentDidMount () {
@@ -27,7 +26,7 @@ export default class DeleteArticleModal extends React.Component {
}
handleYesButtonClick (e) {
store.dispatch(destroyArticle(this.props.articleKey))
// store.dispatch(destroyArticle(this.props.articleKey))
this.props.close()
}
@@ -39,8 +38,8 @@ export default class DeleteArticleModal extends React.Component {
<div className='message'>Do you really want to delete?</div>
<div className='control'>
<button ref='no' onClick={e => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button>
<button ref='yes' onClick={e => this.handleYesButtonClick(e)} className='danger'><i className='fa fa-fw fa-check'/> Yes</button>
<button ref='no' onClick={(e) => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button>
<button ref='yes' onClick={(e) => this.handleYesButtonClick(e)} className='danger'><i className='fa fa-fw fa-check'/> Yes</button>
</div>
</div>
)