import React, { Component } from 'react'; import { connect } from 'react-redux'; import '../../../styles/WidgetArea/containers/WidgetArea.scss'; const mapReduxStateToProps = (reduxState) => ({ clientVersion: reduxState.gameState.clientVersion, forfeitMode: reduxState.gameState.forfeitMode, remainingMode: reduxState.gameState.remainingMode, hintCost: reduxState.gameState.hintCost, checkPoints: reduxState.gameState.checkPoints, hintPoints: reduxState.gameState.hintPoints, totalChecks: reduxState.gameState.totalChecks, lastCheck: reduxState.gameState.lastCheck, }); class WidgetArea extends Component { constructor(props) { super(props); this.state = { collapsed: false, }; } saveNotes = (event) => { localStorage.setItem('notes', event.target.value); }; // eslint-disable-next-line react/no-access-state-in-setstate toggleCollapse = () => this.setState({ collapsed: !this.state.collapsed }); render() { return (
{ this.state.collapsed ? (
) : null } { this.state.collapsed ? null : (
Game Info:
Client Version: {this.props.clientVersion}
Forfeit Mode: {this.props.forfeitMode}
Remaining Mode: {this.props.remainingMode}
Checks:
Total Checks: {this.props.totalChecks}
Last Check: {this.props.lastCheck}
Hint Data:
Hint Cost: {this.props.hintCost}
Check Points: {this.props.checkPoints}
Current Points: {this.props.hintPoints}
Notes: