Files
SCM-Manager/scm-ui/src/containers/ProfileInfo.js

57 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-11-07 14:45:27 +01:00
// @flow
import React from "react";
import AvatarWrapper from "../repos/components/changesets/AvatarWrapper";
import type { Me } from "@scm-manager/ui-types";
2018-11-07 15:43:33 +01:00
import { MailLink } from "@scm-manager/ui-components";
2018-11-07 14:45:27 +01:00
import { compose } from "redux";
import { translate } from "react-i18next";
type Props = {
me: Me,
// Context props
t: string => string
};
type State = {};
class ProfileInfo extends React.Component<Props, State> {
render() {
const { me, t } = this.props;
return (
2018-11-07 15:43:33 +01:00
<>
2018-11-07 14:45:27 +01:00
<AvatarWrapper>
<div>
<figure className="media-left">
<p className="image is-64x64">
{
// TODO: add avatar
}
</p>
</figure>
</div>
</AvatarWrapper>
2018-11-07 15:43:33 +01:00
<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>
</>
2018-11-07 14:45:27 +01:00
);
}
}
export default compose(translate("commons"))(ProfileInfo);