Download wp-calypso/client/sites/marketing/connections/inline-connection.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 919 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/marketing/connections/inline-connection.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/sites/marketing/connections/inline-connection.jsx
-
curl -L -o inline-connection.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/marketing/connections/inline-connection.jsx
919 Bytes
| import PropTypes from 'prop-types'; | |
| import { Component } from 'react'; | |
| import { connect } from 'react-redux'; | |
| import QueryKeyringServices from 'calypso/components/data/query-keyring-services'; | |
| import QueryPublicizeConnections from 'calypso/components/data/query-publicize-connections'; | |
| import { getKeyringServiceByName } from 'calypso/state/sharing/services/selectors'; | |
| import InlineConnectionAction from './inline-connection-action'; | |
| class InlineConnection extends Component { | |
| static propTypes = { | |
| serviceName: PropTypes.string.isRequired, | |
| }; | |
| render() { | |
| const { service } = this.props; | |
| return ( | |
| <div> | |
| <QueryPublicizeConnections selectedSite /> | |
| <QueryKeyringServices /> | |
| { service && <InlineConnectionAction service={ service } /> } | |
| </div> | |
| ); | |
| } | |
| } | |
| export default connect( ( state, props ) => ( { | |
| service: getKeyringServiceByName( state, props.serviceName ), | |
| } ) )( InlineConnection ); | |