Skip to content

Commit

Permalink
add success on copy
Browse files Browse the repository at this point in the history
  • Loading branch information
meriadec committed Apr 5, 2017
1 parent 0676fc8 commit 20565e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/pages/Project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class ProjectPage extends Component {

handleCopyHTML = () => {
clipboard.writeText(this.props.preview.content)
this.props.addAlert('Copied!', 'success')
}

handleExportToHTML = async () => {
Expand Down
2 changes: 1 addition & 1 deletion app/reducers/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { handleActions } from 'redux-actions'
const state = []

export default handleActions({
ALERT_ADD: (state, { payload: alert }) => [alert, ...state],
ALERT_ADD: (state, { payload: alert }) => [alert, ...state].slice(0, 5),
ALERT_REMOVE: (state, { payload: id }) => state.filter(a => a.id !== id),
}, state)

Expand Down

0 comments on commit 20565e2

Please sign in to comment.