Download wp-calypso/client/switch-site/controller.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 310 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/switch-site/controller.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/switch-site/controller.tsx
-
curl -L -o controller.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/switch-site/controller.tsx
310 Bytes
| import { SiteSwitch } from './components/site-switch'; | |
| import type { Context as PageJSContext } from '@automattic/calypso-router'; | |
| export default function siteSwitcher( context: PageJSContext, next: () => void ) { | |
| context.primary = <SiteSwitch redirectTo={ context.query.route?.trim() ?? '' } />; | |
| next(); | |
| } | |