Download wp-calypso/client/layout/community-translator/index.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 724 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/community-translator/index.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/layout/community-translator/index.jsx
-
curl -L -o index.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/community-translator/index.jsx
724 Bytes
| import config from '@automattic/calypso-config'; | |
| import { useSelector } from 'react-redux'; | |
| import CommunityTranslator from 'calypso/components/community-translator'; | |
| import CommunityTranslatorLauncher from 'calypso/layout/community-translator/launcher'; | |
| import isCommunityTranslatorEnabled from 'calypso/state/selectors/is-community-translator-enabled'; | |
| export default function CommunityTranslatorMain() { | |
| const communityTranslatorEnabled = useSelector( isCommunityTranslatorEnabled ); | |
| if ( config.isEnabled( 'i18n/community-translator' ) && communityTranslatorEnabled ) { | |
| return <CommunityTranslator />; | |
| } else if ( config( 'restricted_me_access' ) ) { | |
| return <CommunityTranslatorLauncher />; | |
| } | |
| return null; | |
| } | |