import Head from 'next/head'; import React from 'react'; import { connect } from 'react-redux'; import posed from 'react-pose'; import { Button, Card, CardBody, Container, CustomInput, Fade, Form, FormGroup, Input, Label } from 'reactstrap'; import { TurniereNavigation } from '../js/components/Navigation'; import { Footer } from '../js/components/Footer'; import { UserRestrictor, Option } from '../js/components/UserRestrictor'; import { Login } from '../js/components/Login'; import { verifyCredentials } from '../js/api'; import EditableStringList from '../js/components/EditableStringList'; import '../static/everypage.css'; class PrivateCreatePage extends React.Component { componentDidMount() { verifyCredentials(); } render() { const { isSignedIn } = this.props; return ( ); } } function mapStateToCreatePageProperties(state) { const { isSignedIn } = state.userinfo; return { isSignedIn }; } const CreatePage = connect( mapStateToCreatePageProperties )(PrivateCreatePage); export default CreatePage; function CreateTournamentCard() { return (

Turnier erstellen

); } const GroupphaseFader = posed.div({ visible: { opacity: 1, height: 150 }, hidden: { opacity: 0, height: 0 } }); class CreateTournamentForm extends React.Component { constructor(props) { super(props); this.state = { groupPhaseEnabled: false, groupSize: 4, groupAdvance: 1, teams: [], groups: [] }; this.handleGroupPhaseEnabledInput = this.handleGroupPhaseEnabledInput.bind(this); this.teamListUpdate = this.teamListUpdate.bind(this); this.handleGroupSizeInput = this.handleGroupSizeInput.bind(this); this.handleGroupAdvanceInput = this.handleGroupAdvanceInput.bind(this); } render() { return (

Teams

); } teamListUpdate(list) { this.setState({teams: list}); } groupListUpdate(list) { this.setState({groups: list}); } handleGroupSizeInput(input) { let newSize = input.target.value; if(newSize <= this.state.groupAdvance) { this.setState({ groupSize: newSize, groupAdvance: newSize - 1 }); } else { this.setState({ groupSize: newSize }); } } handleGroupAdvanceInput(input) { this.setState({ groupAdvance: input.target.value }); } handleGroupPhaseEnabledInput(input) { this.setState({ groupPhaseEnabled: input.target.checked }); } }