mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
19 lines
336 B
JavaScript
19 lines
336 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
|
|
const GameInfo = (props) => {
|
|
return (
|
|
<div className="game-info">
|
|
<p>Playing {props.opponent}</p>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const mapStateToProps = (state) => {
|
|
return {
|
|
opponent: state.opponent,
|
|
};
|
|
};
|
|
|
|
export default connect(mapStateToProps)(GameInfo);
|