Files
SCM-Manager/scm-ui/src/repos/components/changesets/ChangesetList.js

23 lines
668 B
JavaScript
Raw Normal View History

2018-09-17 14:03:13 +02:00
// @flow
import ChangesetRow from "./ChangesetRow";
import React from "react";
import type { Changeset, Repository } from "../../../../../scm-ui-components/packages/ui-types/src/index";
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-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;
const content = changesets.map((changeset, index) => {
2018-09-19 16:05:35 +02:00
return <ChangesetRow key={index} repository={repository} changeset={changeset} />;
});
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;