import React from 'react'; import { Checkbox } from 'plugin-api/beta/client/components/ui'; import { t } from 'plugin-api/beta/client/services'; import styles from './TermsAndConditionsField.css'; import cn from 'classnames'; const pluginName = 'talk-plugin-auth-checkbox'; const TermsLink = () => ( {t('talk-plugin-auth-checkbox.terms')} ); const PrivacyLink = () => ( {t('talk-plugin-auth-checkbox.privacy-policy')} ); class TermsAndConditionsField extends React.Component { state = { checked: false }; id = 'terms-and-conditions'; componentWillMount() { this.props.indicateBlockerOn(pluginName); } onChange = ({ target: { checked } }) => { if (checked) { this.setState(() => ({ checked })); this.props.indicateBlockerOff(pluginName); } else { this.setState(() => ({ checked })); this.props.indicateBlockerOn(pluginName); } }; render() { return (
{t('talk-plugin-auth-checkbox.copy')} {t('talk-plugin-auth-checkbox.and')} {t('talk-plugin-auth-checkbox.from')}
); } } export default TermsAndConditionsField;