Fixed routing for profile page

This commit is contained in:
Philipp Czora
2018-11-07 15:43:33 +01:00
parent b5cde2a39f
commit 28fa2c4b2b
2 changed files with 58 additions and 38 deletions

View File

@@ -1,9 +1,8 @@
// @flow
import React from "react";
import AvatarWrapper from "../repos/components/changesets/AvatarWrapper";
import { NavLink } from "react-router-dom";
import type { Me } from "@scm-manager/ui-types";
import { MailLink, Navigation, Section } from "@scm-manager/ui-components";
import { MailLink } from "@scm-manager/ui-components";
import { compose } from "redux";
import { translate } from "react-i18next";
@@ -19,7 +18,7 @@ class ProfileInfo extends React.Component<Props, State> {
render() {
const { me, t } = this.props;
return (
<div className="columns">
<>
<AvatarWrapper>
<div>
<figure className="media-left">
@@ -31,33 +30,25 @@ class ProfileInfo extends React.Component<Props, State> {
</figure>
</div>
</AvatarWrapper>
<div className="column is-two-quarters">
<table className="table">
<tbody>
<tr>
<td>{t("profile.username")}</td>
<td>{me.name}</td>
</tr>
<tr>
<td>{t("profile.displayName")}</td>
<td>{me.displayName}</td>
</tr>
<tr>
<td>{t("profile.mail")}</td>
<td>
<MailLink address={me.mail} />
</td>
</tr>
</tbody>
</table>
</div>
<div className="column is-one-quarter">
<Navigation>
<Section label={t("profile.actions-label")} />
<NavLink to={"password"}>{t("profile.change-password")}</NavLink>
</Navigation>
</div>
</div>
<table className="table">
<tbody>
<tr>
<td>{t("profile.username")}</td>
<td>{me.name}</td>
</tr>
<tr>
<td>{t("profile.displayName")}</td>
<td>{me.displayName}</td>
</tr>
<tr>
<td>{t("profile.mail")}</td>
<td>
<MailLink address={me.mail} />
</td>
</tr>
</tbody>
</table>
</>
);
}
}