1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 14:21:23 +00:00

[system admin] update user links (#4234)

This commit is contained in:
llj
2019-11-07 14:17:59 +08:00
committed by Daniel Pan
parent b60d0e6170
commit fd8e5c44e8
26 changed files with 95 additions and 49 deletions

View File

@@ -0,0 +1,20 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link } from '@reach/router';
import { siteRoot } from '../../utils/constants';
const propTypes = {
email: PropTypes.string.isRequired,
name: PropTypes.string.isRequired
};
class UserLink extends Component {
render() {
return <Link to={`${siteRoot}sys/users/${encodeURIComponent(this.props.email)}/`}>{this.props.name}</Link>;
}
}
UserLink.propTypes = propTypes;
export default UserLink;