1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/assets/js/components/game-info.js
2018-09-08 16:57:19 -04:00

24 lines
485 B
JavaScript

import React from "react";
import { connect } from "react-redux";
const GameInfo = (props) => {
return (
<div className="game-info">
<p>
Playing {props.opponent} - <span className={props.opponentStatus}>
{props.opponentStatus}
</span>
</p>
</div>
);
};
const mapStateToProps = (state) => {
return {
opponent: state.opponent,
opponentStatus: state.opponentStatus,
};
};
export default connect(mapStateToProps)(GameInfo);