Fixed issues noticed in review

This commit is contained in:
Philipp Czora
2018-10-08 17:34:11 +02:00
parent e58269444b
commit dbe9ee59a8
14 changed files with 160 additions and 104 deletions

View File

@@ -9,19 +9,25 @@ type Props = {
export default class ChangesetAuthor extends React.Component<Props> {
render() {
const { changeset } = this.props;
const { name } = this.props.changeset.author;
return (
<>
{changeset.author.name}{" "}
<a
className="is-hidden-mobile"
href={"mailto:" + changeset.author.mail}
>
&lt;
{changeset.author.mail}
&gt;
</a>
{name} {this.renderMail()}
</>
);
}
renderMail() {
const { mail } = this.props.changeset.author;
if (mail) {
return (
<a className="is-hidden-mobile" href={"mailto:" + mail}>
&lt;
{mail}
&gt;
</a>
);
}
}
}

View File

@@ -1,8 +1,7 @@
//@flow
import React from "react";
import { ExtensionPoint } from "@scm-manager/ui-extensions";
import type { Changeset } from "../../../../../scm-ui-components/packages/ui-types/src/index";
import { Image } from "../../../../../scm-ui-components/packages/ui-components/src/index";
import type { Changeset } from "@scm-manager/ui-types";
type Props = {
changeset: Changeset

View File

@@ -1,7 +1,7 @@
// @flow
import ChangesetRow from "./ChangesetRow";
import React from "react";
import type { Changeset, Repository } from "../../../../../scm-ui-components/packages/ui-types/src/index";
import type { Changeset, Repository } from "@scm-manager/ui-types";
import classNames from "classnames";
type Props = {
@@ -13,7 +13,13 @@ class ChangesetList extends React.Component<Props> {
render() {
const { repository, changesets } = this.props;
const content = changesets.map((changeset, index) => {
return <ChangesetRow key={index} repository={repository} changeset={changeset} />;
return (
<ChangesetRow
key={index}
repository={repository}
changeset={changeset}
/>
);
});
return <div className={classNames("box")}>{content}</div>;
}

View File

@@ -1,15 +1,12 @@
//@flow
import React from "react";
import type {
Changeset,
Repository
} from "../../../../../scm-ui-components/packages/ui-types/src/index";
import type { Changeset, Repository } from "@scm-manager/ui-types";
import classNames from "classnames";
import { translate, Interpolate } from "react-i18next";
import ChangesetAvatar from "./ChangesetAvatar";
import ChangesetId from "./ChangesetId";
import injectSheet from "react-jss";
import { DateFromNow } from "../../../../../scm-ui-components/packages/ui-components/src/index";
import { DateFromNow } from "@scm-manager/ui-components";
import ChangesetAuthor from "./ChangesetAuthor";
const styles = {