react-code-dataset / wp-calypso /apps /notifications /src /panel /state /notes /thunks /trash-note.js
react-code-dataset / wp-calypso /apps /notifications /src /panel /state /notes /thunks /trash-note.js
Download wp-calypso/apps/notifications/src/panel/state/notes/thunks/trash-note.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/notifications/src/panel/state/notes/thunks/trash-note.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/notifications/src/panel/state/notes/thunks/trash-note.js
-
curl -L -o trash-note.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/notifications/src/panel/state/notes/thunks/trash-note.js
463 Bytes
| 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; | |