Download wp-calypso/client/state/comments/selectors/get-active-reply-comment-id.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 652 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/comments/selectors/get-active-reply-comment-id.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/comments/selectors/get-active-reply-comment-id.js
-
curl -L -o get-active-reply-comment-id.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/comments/selectors/get-active-reply-comment-id.js
652 Bytes
| import { getStateKey } from 'calypso/state/comments/utils'; | |
| import 'calypso/state/comments/init'; | |
| /** | |
| * Returns the active reply comment for a given site and post. | |
| * @param {Object} options options object. | |
| * @param {Object} options.state Global state tree | |
| * @param {number} options.siteId The ID of the site we're querying | |
| * @param {number} options.postId The ID of the post we're querying | |
| * @returns {number|string} commentId Can be a string if the comment is a placeholder | |
| */ | |
| export function getActiveReplyCommentId( { state, siteId, postId } ) { | |
| return state.comments.activeReplies[ getStateKey( siteId, postId ) ] ?? null; | |
| } | |