import React, { PropTypes } from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './AdminPerson.css'; import Button from '../../components/Button'; class AdminPerson extends React.Component { static propTypes = { title: PropTypes.string.isRequired, person: PropTypes.shape({ key: PropTypes.string.isRequired, firstname: PropTypes.string, lastname: PropTypes.string, completed: PropTypes.boolean, email: PropTypes.string, password: PropTypes.string, attending: PropTypes.boolean, ceremony: PropTypes.boolean, }).isRequired, }; state = { firstname: this.props.person.firstname, lastname: this.props.person.lastname, }; handleFirstnameChange = (event) => { this.setState({ firstname: event.target.value }); } handleLastnameChange = (event) => { this.setState({ lastname: event.target.value }); } render() { return (

{this.state.firstname} {this.state.lastname}

); } } export default withStyles(s)(AdminPerson);