Download wp-calypso/client/data/post-formats/use-post-formats-query.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 293 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/post-formats/use-post-formats-query.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/post-formats/use-post-formats-query.js
-
curl -L -o use-post-formats-query.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/post-formats/use-post-formats-query.js
293 Bytes
| import { useQuery } from '@tanstack/react-query'; | |
| import wpcom from 'calypso/lib/wp'; | |
| const usePostFormatsQuery = ( siteId ) => | |
| useQuery( { | |
| queryKey: [ 'postFormats', siteId ], | |
| queryFn: () => wpcom.req.get( `/sites/${ siteId }/post-formats` ), | |
| } ); | |
| export default usePostFormatsQuery; | |