Download wp-calypso/client/jetpack-cloud/sections/golden-token/controller.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/jetpack-cloud/sections/golden-token/controller.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/jetpack-cloud/sections/golden-token/controller.tsx
-
curl -L -o controller.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/jetpack-cloud/sections/golden-token/controller.tsx
379 Bytes
| import config from '@automattic/calypso-config'; | |
| import page, { type Callback } from '@automattic/calypso-router'; | |
| import { GoldenTokenDialog } from './golden-token-dialog'; | |
| export const goldenTokenContext: Callback = ( context, next ) => { | |
| if ( ! config.isEnabled( 'jetpack/golden-token' ) ) { | |
| page.redirect( '/' ); | |
| } | |
| context.primary = <GoldenTokenDialog />; | |
| next(); | |
| }; | |