Download wp-calypso/client/sites/logs/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/logs/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/sites/logs/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/logs/index.tsx
1.14 kB
| import page, { type Callback, type Context } from '@automattic/calypso-router'; | |
| import { makeLayout, render as clientRender } from 'calypso/controller'; | |
| import { siteSelection, sites, navigation } from 'calypso/my-sites/controller'; | |
| import { LOGS_PHP, LOGS_WEB } from 'calypso/sites/components/site-preview-pane/constants'; | |
| import { siteDashboard, redirectToHostingFeaturesIfNotAtomic } from 'calypso/sites/controller'; | |
| import { phpErrorLogs, webServerLogs } from './controller'; | |
| export default function () { | |
| page( '/site-logs', siteSelection, sites, makeLayout, clientRender ); | |
| const redirectSiteLogsToPhp: Callback = ( context: Context ) => { | |
| context.page.replace( `/site-logs/${ context.params.site }/php` ); | |
| }; | |
| page( '/site-logs/:site', redirectSiteLogsToPhp ); | |
| page( | |
| '/site-logs/:site/php', | |
| siteSelection, | |
| redirectToHostingFeaturesIfNotAtomic, | |
| navigation, | |
| phpErrorLogs, | |
| siteDashboard( LOGS_PHP ), | |
| makeLayout, | |
| clientRender | |
| ); | |
| page( | |
| '/site-logs/:site/web', | |
| siteSelection, | |
| redirectToHostingFeaturesIfNotAtomic, | |
| navigation, | |
| webServerLogs, | |
| siteDashboard( LOGS_WEB ), | |
| makeLayout, | |
| clientRender | |
| ); | |
| } | |