mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
fix react missing key in list entries warning
This commit is contained in:
@@ -12,10 +12,10 @@ type Props = {
|
|||||||
class ChangesetList extends React.Component<Props> {
|
class ChangesetList extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { repository, changesets } = this.props;
|
const { repository, changesets } = this.props;
|
||||||
const content = changesets.map((changeset, index) => {
|
const content = changesets.map(changeset => {
|
||||||
return (
|
return (
|
||||||
<ChangesetRow
|
<ChangesetRow
|
||||||
key={index}
|
key={changeset.id}
|
||||||
repository={repository}
|
repository={repository}
|
||||||
changeset={changeset}
|
changeset={changeset}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import injectSheet from "react-jss";
|
|||||||
import { DateFromNow } from "@scm-manager/ui-components";
|
import { DateFromNow } from "@scm-manager/ui-components";
|
||||||
import ChangesetAuthor from "./ChangesetAuthor";
|
import ChangesetAuthor from "./ChangesetAuthor";
|
||||||
import ChangesetTag from "./ChangesetTag";
|
import ChangesetTag from "./ChangesetTag";
|
||||||
|
import { compose } from "redux";
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
pointer: {
|
pointer: {
|
||||||
@@ -74,7 +75,7 @@ class ChangesetRow extends React.Component<Props> {
|
|||||||
return (
|
return (
|
||||||
<div className="media-right">
|
<div className="media-right">
|
||||||
{tags.map((tag: Tag) => {
|
{tags.map((tag: Tag) => {
|
||||||
return <ChangesetTag tag={tag} />;
|
return <ChangesetTag key={tag.name} tag={tag} />;
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -83,4 +84,7 @@ class ChangesetRow extends React.Component<Props> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default injectSheet(styles)(translate("repos")(ChangesetRow));
|
export default compose(
|
||||||
|
injectSheet(styles),
|
||||||
|
translate("repos")
|
||||||
|
)(ChangesetRow);
|
||||||
|
|||||||
Reference in New Issue
Block a user