Download wp-calypso/client/dashboard/app/queries/site-php-version.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 513 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/app/queries/site-php-version.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/app/queries/site-php-version.ts
-
curl -L -o site-php-version.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/app/queries/site-php-version.ts
513 Bytes
| import { fetchPHPVersion, updatePHPVersion } from '../../data/site-hosting'; | |
| import { queryClient } from '../query-client'; | |
| export const sitePHPVersionQuery = ( siteId: number ) => ( { | |
| queryKey: [ 'site', siteId, 'php-version' ], | |
| queryFn: () => fetchPHPVersion( siteId ), | |
| } ); | |
| export const sitePHPVersionMutation = ( siteId: number ) => ( { | |
| mutationFn: ( version: string ) => updatePHPVersion( siteId, version ), | |
| onSuccess: () => { | |
| queryClient.invalidateQueries( sitePHPVersionQuery( siteId ) ); | |
| }, | |
| } ); | |