react-code-dataset / wp-calypso /apps /blaze-dashboard /src /components /generic-header /blaze-plugin-header /index.jsx
react-code-dataset / wp-calypso /apps /blaze-dashboard /src /components /generic-header /blaze-plugin-header /index.jsx
Download wp-calypso/apps/blaze-dashboard/src/components/generic-header/blaze-plugin-header/index.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 543 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/blaze-dashboard/src/components/generic-header/blaze-plugin-header/index.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/blaze-dashboard/src/components/generic-header/blaze-plugin-header/index.jsx
-
curl -L -o index.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/blaze-dashboard/src/components/generic-header/blaze-plugin-header/index.jsx
543 Bytes
| import config from '@automattic/calypso-config'; | |
| import clsx from 'clsx'; | |
| import { useTranslate } from 'i18n-calypso'; | |
| import './style.scss'; | |
| const WooBlazeHeader = ( { className = '', children } ) => { | |
| const translate = useTranslate(); | |
| const isBlazePlugin = config.isEnabled( 'is_running_in_blaze_plugin' ); | |
| return ( | |
| <header className={ clsx( 'blaze-plugin-header', className ) }> | |
| <h2>{ isBlazePlugin ? translate( 'Blaze Ads' ) : translate( 'Advertising' ) }</h2> | |
| { children } | |
| </header> | |
| ); | |
| }; | |
| export default WooBlazeHeader; | |