react-code-dataset / wp-calypso /client /hosting /server-settings /components /hosting-error-status.tsx
react-code-dataset / wp-calypso /client /hosting /server-settings /components /hosting-error-status.tsx
Download wp-calypso/client/hosting/server-settings/components/hosting-error-status.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 720 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/hosting/server-settings/components/hosting-error-status.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/hosting/server-settings/components/hosting-error-status.tsx
-
curl -L -o hosting-error-status.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/hosting/server-settings/components/hosting-error-status.tsx
720 Bytes
| import { translate } from 'i18n-calypso'; | |
| import Notice from 'calypso/components/notice'; | |
| import { activateContext } from './activate-context'; | |
| interface HostingErrorStatusProps { | |
| context: activateContext; | |
| } | |
| export const HostingErrorStatus = ( { context }: HostingErrorStatusProps ) => { | |
| const getErrorText = () => { | |
| switch ( context ) { | |
| case 'theme': | |
| return translate( 'There was an error activating theme features.' ); | |
| case 'plugin': | |
| return translate( 'There was an error activating plugin features.' ); | |
| default: | |
| return translate( 'There was an error activating hosting features.' ); | |
| } | |
| }; | |
| return <Notice status="is-error" showDismiss={ false } text={ getErrorText() } icon="bug" />; | |
| }; | |