Download wp-calypso/client/state/comments/ui/actions.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 811 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/comments/ui/actions.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/comments/ui/actions.js
-
curl -L -o actions.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/comments/ui/actions.js
811 Bytes
| import { COMMENTS_QUERY_UPDATE } from 'calypso/state/action-types'; | |
| import 'calypso/state/comments/init'; | |
| /** | |
| * Creates an action that updates the comments pagination for the given site and filters. | |
| * @param {number} siteId Site identifier. | |
| * @param {Array<Object>} comments List of comments. | |
| * @param {Object} query Current filter parameters. | |
| * @param {string} [query.order] Query order ('ASC' or 'DESC'). | |
| * @param {number} query.page Page to update. | |
| * @param {number} [query.postId] Post identifier. | |
| * @param {string} [query.search] Search query. | |
| * @param {string} query.status Comments status. | |
| * @returns {Object} Action that updates the comments pagination. | |
| */ | |
| export const updateCommentsQuery = ( siteId, comments, query ) => ( { | |
| type: COMMENTS_QUERY_UPDATE, | |
| siteId, | |
| comments, | |
| query, | |
| } ); | |