Download wp-calypso/client/jetpack-cloud/sections/pricing/index.web.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.88 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/jetpack-cloud/sections/pricing/index.web.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/jetpack-cloud/sections/pricing/index.web.ts
-
curl -L -o index.web.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/jetpack-cloud/sections/pricing/index.web.ts
1.88 kB
| import page from '@automattic/calypso-router'; | |
| import { setLocaleMiddleware } from 'calypso/controller/shared'; | |
| import { loggedInSiteSelection } from 'calypso/my-sites/controller'; | |
| import jetpackPlans from 'calypso/my-sites/plans/jetpack-plans'; | |
| import { jetpackStoragePlans } from 'calypso/my-sites/plans/jetpack-plans/jetpack-storage-plans'; | |
| import { jetpackUpsell } from 'calypso/my-sites/plans/jetpack-plans/jetpack-upsell'; | |
| import { jetpackPricingContext } from './controller'; | |
| import './style.scss'; | |
| export default function (): void { | |
| // Redirects | |
| page( '/:locale/plans/storage/:site', ( { params } ) => | |
| page.redirect( `/${ params.locale }/pricing/storage/${ params.site }` ) | |
| ); | |
| page( '/plans/storage/:site', ( { params } ) => | |
| page.redirect( `/pricing/storage/${ params.site }` ) | |
| ); | |
| page( '/:locale/plans/upsell/:product/:site?', ( { params } ) => | |
| page.redirect( `/${ params.locale }/pricing/upsell/${ params.product }/${ params.site || '' }` ) | |
| ); | |
| page( '/plans/upsell/:product/:site?', ( { params } ) => | |
| page.redirect( `/pricing/upsell/${ params.product }/${ params.site || '' }` ) | |
| ); | |
| page( '/:locale/plans', ( { params } ) => page.redirect( `/${ params.locale }/pricing` ) ); | |
| page( '/plans/:site', ( { params } ) => page.redirect( `/pricing/${ params.site }` ) ); | |
| page( '/plans', '/pricing' ); | |
| jetpackStoragePlans( | |
| '/:lang/pricing', | |
| setLocaleMiddleware(), | |
| loggedInSiteSelection, | |
| jetpackPricingContext | |
| ); | |
| jetpackStoragePlans( '/pricing', loggedInSiteSelection, jetpackPricingContext ); | |
| jetpackUpsell( | |
| '/:lang/pricing', | |
| setLocaleMiddleware(), | |
| loggedInSiteSelection, | |
| jetpackPricingContext | |
| ); | |
| jetpackUpsell( '/pricing', loggedInSiteSelection, jetpackPricingContext ); | |
| jetpackPlans( '/:lang/pricing', setLocaleMiddleware(), jetpackPricingContext ); | |
| jetpackPlans( '/pricing', loggedInSiteSelection, jetpackPricingContext ); | |
| } | |