react-code-dataset / wp-calypso /client /sites /deployments /components /deployment-style /context.ts
react-code-dataset / wp-calypso /client /sites /deployments /components /deployment-style /context.ts
Download wp-calypso/client/sites/deployments/components/deployment-style/context.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/deployments/components/deployment-style/context.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/sites/deployments/components/deployment-style/context.ts
-
curl -L -o context.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/deployments/components/deployment-style/context.ts
542 Bytes
| import { createContext, useContext } from 'react'; | |
| import { WorkflowsValidation } from './use-check-workflow-query'; | |
| export type DeploymentStyleContextProps = { | |
| isCheckingWorkflow: boolean; | |
| onWorkflowVerify(): void; | |
| workflowCheckResult?: WorkflowsValidation; | |
| }; | |
| export const DeploymentStyleContext = createContext< DeploymentStyleContextProps >( { | |
| isCheckingWorkflow: false, | |
| onWorkflowVerify() {}, | |
| workflowCheckResult: undefined, | |
| } ); | |
| export const useDeploymentStyleContext = () => { | |
| return useContext( DeploymentStyleContext ); | |
| }; | |