File size: 463 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import { recordTracksEvent } from '../../../helpers/stats';
import { trashNote as trashNoteAction } from '../actions';
import bumpStat from '../utils/bump-stat';
const trashNote = ( note, restClient ) => ( dispatch ) => {
bumpStat( 'trash-comment' );
recordTracksEvent( 'calypso_notification_note_trash', {
note_type: note.type,
} );
dispatch( trashNoteAction( note.id ) );
restClient.global.updateUndoBar( 'trash', note );
};
export default trashNote;
|