Highlighting user's name in the game ladder

This commit is contained in:
2019-06-11 16:53:43 +10:00
parent 162d0f4c1a
commit b714f43a59
4 changed files with 20 additions and 3 deletions
+16
View File
@@ -1,4 +1,5 @@
import React from 'react';
import { connect } from 'react-redux';
import queryString from 'query-string';
import CommonLinks from '../panels/common_links.jsx';
@@ -43,6 +44,7 @@ class Ladder extends React.Component {
<PagedLadder
start={this.state.start}
length={this.state.length}
highlightedName={this.props.username}
getFetch={this.getFetch.bind(this)}
onReceived={this.onReceived.bind(this)}
/>
@@ -102,4 +104,18 @@ class Ladder extends React.Component {
}
};
const mapStoreToProps = (store) => {
return {
username: store.account.username
};
};
const mapDispatchToProps = (dispatch) => {
return {
//
};
};
Ladder = connect(mapStoreToProps, mapDispatchToProps)(Ladder);
export default Ladder;