import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { SimpleForm, SimpleInput, TextInput, Checkbox, } from 'gabsocial/features/forms'; import { register } from 'gabsocial/actions/auth'; const mapStateToProps = (state, props) => ({ instance: state.get('instance'), }); export default @connect(mapStateToProps) class RegistrationForm extends ImmutablePureComponent { static propTypes = { instance: ImmutablePropTypes.map, } onInputChange = e => { this.setState({ [e.target.name]: e.target.value }); } onCheckboxChange = e => { this.setState({ [e.target.name]: e.target.checked }); } onSubmit = e => { this.props.dispatch(register(this.state)); } render() { const { instance } = this.props; return (

With an account on {instance.get('title')} you'll be able to follow people on any server in the fediverse.

I agree to the Terms of Service.} name='agreement' onChange={this.onCheckboxChange} required />
); } }