diff --git a/app/pages/Project/index.js b/app/pages/Project/index.js index e23b8d4b..87de79eb 100644 --- a/app/pages/Project/index.js +++ b/app/pages/Project/index.js @@ -88,6 +88,7 @@ class ProjectPage extends Component { handleCopyHTML = () => { clipboard.writeText(this.props.preview.content) + this.props.addAlert('Copied!', 'success') } handleExportToHTML = async () => { diff --git a/app/reducers/alerts.js b/app/reducers/alerts.js index ee180aec..7b0955a6 100644 --- a/app/reducers/alerts.js +++ b/app/reducers/alerts.js @@ -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)