mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-05-30 17:00:56 +00:00
Address react warnings vis implementing unique keys
This commit is contained in:
parent
2292e374b3
commit
fd9a9e94fb
5 changed files with 29 additions and 21 deletions
|
@ -864,9 +864,9 @@ const GathererListItem = React.createClass({
|
|||
let adminOptions;
|
||||
if ((user && user.admin) || (user && user.moderator)) {
|
||||
adminOptions = [
|
||||
<hr />,
|
||||
<dt>Admin</dt>,
|
||||
<dd>
|
||||
<hr key="line"/>,
|
||||
<dt key="title">Admin</dt>,
|
||||
<dd key="adminmenu">
|
||||
<button
|
||||
className="btn btn-xs btn-danger"
|
||||
value={gatherer.user.id}
|
||||
|
@ -951,7 +951,7 @@ const Gatherers = React.createClass({
|
|||
})
|
||||
.map(gatherer => {
|
||||
return <GathererListItem socket={socket} gatherer={gatherer} thisGatherer={thisGatherer}
|
||||
soundController={this.props.soundController}
|
||||
soundController={this.props.soundController} key={gatherer.id}
|
||||
user={user} gather={gather}/>
|
||||
});
|
||||
|
||||
|
@ -1004,9 +1004,9 @@ const CompletedGather = exports.CompletedGather = React.createClass({
|
|||
let maps = this.props.maps;
|
||||
let servers = this.props.servers;
|
||||
if (this.state.show) {
|
||||
gatherInfo.push(<GatherTeams gather={gather} />);
|
||||
gatherInfo.push(<GatherTeams gather={gather} key="gatherteams" />);
|
||||
gatherInfo.push(<GatherVotingResults gather={gather}
|
||||
maps={maps}
|
||||
maps={maps} key="gathervotingresults"
|
||||
servers={servers}/>);
|
||||
}
|
||||
return (
|
||||
|
|
|
@ -15,7 +15,7 @@ const ArchivedGathers = exports.ArchivedGathers = React.createClass({
|
|||
})
|
||||
.map((archivedGather, index) => {
|
||||
return <CompletedGather
|
||||
id={archivedGather.gather.done.time}
|
||||
key={archivedGather.gather.done.time}
|
||||
show={(index === 0) ? true : false}
|
||||
gather={archivedGather.gather}
|
||||
maps={this.props.maps}
|
||||
|
|
|
@ -156,10 +156,12 @@ const GatherPage = React.createClass({
|
|||
modal: null,
|
||||
gatherPool: {
|
||||
classic: {
|
||||
gatherers: []
|
||||
gatherers: [],
|
||||
type: "classic"
|
||||
},
|
||||
casual: {
|
||||
gatherers: []
|
||||
gatherers: [],
|
||||
type: "casual"
|
||||
}
|
||||
},
|
||||
currentGather: "classic",
|
||||
|
|
|
@ -321,16 +321,22 @@ const ChatMessage = React.createClass({
|
|||
);
|
||||
}
|
||||
|
||||
return self.autolink(message, {
|
||||
target: "_blank",
|
||||
rel: "nofollow"
|
||||
}).map((elem) => {
|
||||
if (_.isString(elem)) {
|
||||
return self.emojify(elem);
|
||||
} else {
|
||||
return elem;
|
||||
return (
|
||||
<p className="wordwrap">
|
||||
{
|
||||
self.autolink(message, {
|
||||
target: "_blank",
|
||||
rel: "nofollow"
|
||||
}).map((elem) => {
|
||||
if (_.isString(elem)) {
|
||||
return self.emojify(elem);
|
||||
} else {
|
||||
return elem;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
</p>
|
||||
);
|
||||
},
|
||||
|
||||
render() {
|
||||
|
@ -360,7 +366,7 @@ const ChatMessage = React.createClass({
|
|||
{deleteButton}
|
||||
</small>
|
||||
</div>
|
||||
<p className="wordwrap">{this.messageContent()}</p>
|
||||
{this.messageContent()}
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
|
|
@ -37,9 +37,9 @@ function Gather (options) {
|
|||
|
||||
this.REGATHER_THRESHOLD = Math.floor(this.teamSize / 2) + 2;
|
||||
|
||||
this.type = options.type || "public";
|
||||
this.type = options.type || "classic";
|
||||
|
||||
this.name = options.name || "Public Gather";
|
||||
this.name = options.name || "Classic Gather";
|
||||
|
||||
this.description = options.description || "No player requirements";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue