2018-09-17 14:03:13 +02:00
|
|
|
// @flow
|
|
|
|
|
import ChangesetRow from "./ChangesetRow";
|
|
|
|
|
import React from "react";
|
2018-10-08 17:34:11 +02:00
|
|
|
import type { Changeset, Repository } from "@scm-manager/ui-types";
|
2018-09-19 09:49:24 +02:00
|
|
|
import classNames from "classnames";
|
2018-09-17 14:03:13 +02:00
|
|
|
|
|
|
|
|
type Props = {
|
2018-09-19 16:05:35 +02:00
|
|
|
repository: Repository,
|
2018-09-17 14:03:13 +02:00
|
|
|
changesets: Changeset[]
|
2018-09-18 16:45:22 +02:00
|
|
|
};
|
2018-09-17 14:03:13 +02:00
|
|
|
|
2018-09-19 16:19:59 +02:00
|
|
|
class ChangesetList extends React.Component<Props> {
|
2018-09-17 14:03:13 +02:00
|
|
|
render() {
|
2018-09-19 16:05:35 +02:00
|
|
|
const { repository, changesets } = this.props;
|
2018-10-17 15:03:32 +02:00
|
|
|
const content = changesets.map(changeset => {
|
2018-10-08 17:34:11 +02:00
|
|
|
return (
|
|
|
|
|
<ChangesetRow
|
2018-10-17 15:03:32 +02:00
|
|
|
key={changeset.id}
|
2018-10-08 17:34:11 +02:00
|
|
|
repository={repository}
|
|
|
|
|
changeset={changeset}
|
|
|
|
|
/>
|
|
|
|
|
);
|
2018-09-18 16:45:22 +02:00
|
|
|
});
|
2018-09-19 09:49:24 +02:00
|
|
|
return <div className={classNames("box")}>{content}</div>;
|
2018-09-17 14:03:13 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-19 16:19:59 +02:00
|
|
|
export default ChangesetList;
|