import React, { PropTypes } from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './Admin.css'; import Link from '../../components/Link'; import Button from '../../components/Button'; class Admin extends React.Component { static propTypes = { title: PropTypes.string.isRequired, people: PropTypes.arrayOf(PropTypes.shape({ key: PropTypes.string.isRequired, firstname: PropTypes.string, lastname: PropTypes.string, email: PropTypes.string, password: PropTypes.string, attending: PropTypes.boolean, })).isRequired, starters: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string, total: PropTypes.integer, })).isRequired, mains: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string, total: PropTypes.integer, })).isRequired, build: PropTypes.shape({ hash: PropTypes.string, time: PropTypes.string, }), settings: PropTypes.shape({ slack: PropTypes.boolean, email: PropTypes.boolean, }), }; render() { return (
{this.props.people.length} people
{this.props.people.filter(person => person.completed).length} responses
Manage people