Download wp-calypso/client/data/site-checklist/use-site-checklist-task.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 639 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/site-checklist/use-site-checklist-task.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/site-checklist/use-site-checklist-task.ts
-
curl -L -o use-site-checklist-task.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/site-checklist/use-site-checklist-task.ts
639 Bytes
| import { Task } from 'calypso/state/checklist/types'; | |
| import { CHECKLIST_KNOWN_TASKS } from 'calypso/state/data-layer/wpcom/checklist/index.js'; | |
| import useSiteChecklist from './use-site-checklist'; | |
| /** | |
| * Request a update for the specified task | |
| * @param siteId The site ID | |
| * @param taskId The task ID you want to update | |
| */ | |
| const useSiteChecklistTask = ( | |
| siteId: string, | |
| taskId: ( typeof CHECKLIST_KNOWN_TASKS )[ keyof typeof CHECKLIST_KNOWN_TASKS ] | |
| ): Task | undefined => { | |
| const siteChecklist = useSiteChecklist( siteId ); | |
| return siteChecklist?.tasks?.find( ( { id } ) => id === taskId ); | |
| }; | |
| export default useSiteChecklistTask; | |