Download wp-calypso/client/blocks/plugins-scheduled-updates/context/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/plugins-scheduled-updates/context/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/blocks/plugins-scheduled-updates/context/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/plugins-scheduled-updates/context/index.tsx
645 Bytes
| import React, { createContext, ReactNode } from 'react'; | |
| import type { SiteSlug } from 'calypso/types'; | |
| interface PluginUpdateManagerContextProps { | |
| siteSlug: SiteSlug; | |
| } | |
| const PluginUpdateManagerContext = createContext< PluginUpdateManagerContextProps >( { | |
| siteSlug: '', | |
| } ); | |
| const PluginUpdateManagerContextProvider = ( { | |
| siteSlug, | |
| children, | |
| }: PluginUpdateManagerContextProps & { children: ReactNode } ) => { | |
| return ( | |
| <PluginUpdateManagerContext.Provider | |
| value={ { | |
| siteSlug, | |
| } } | |
| > | |
| { children } | |
| </PluginUpdateManagerContext.Provider> | |
| ); | |
| }; | |
| export { PluginUpdateManagerContext, PluginUpdateManagerContextProvider }; | |