Download wp-calypso/client/sites/v2/site-settings/controller.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 437 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/v2/site-settings/controller.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/sites/v2/site-settings/controller.tsx
-
curl -L -o controller.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/v2/site-settings/controller.tsx
437 Bytes
| import { isEnabled } from '@automattic/calypso-config'; | |
| import page from '@automattic/calypso-router'; | |
| import type { Context as PageJSContext } from '@automattic/calypso-router'; | |
| export function redirectToHostingDashboardBackportIfEnabled( | |
| context: PageJSContext, | |
| next: () => void | |
| ) { | |
| if ( isEnabled( 'dashboard/v2/backport/site-settings' ) ) { | |
| return page.redirect( `/sites/settings/v2/${ context.params.site }` ); | |
| } | |
| next(); | |
| } | |