mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 15:26:19 +00:00
* activities tabs * radio group * optimize statistic router * statistic tabs * devices tabs * libraries tabs * users tabs * optimize users * optimize libraries related routers * logs tab * virus scan & admin logs * optimize * revert debug code * optimize --------- Co-authored-by: zhouwenxuan <aries@Mac.local>
21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { Link } from '@gatsbyjs/reach-router';
|
|
import { siteRoot } from '../../utils/constants';
|
|
|
|
const propTypes = {
|
|
email: PropTypes.string,
|
|
name: PropTypes.string.isRequired
|
|
};
|
|
|
|
class UserLink extends Component {
|
|
|
|
render() {
|
|
return <Link to={`${siteRoot}sys/user/${encodeURIComponent(this.props.email)}/`}>{this.props.name}</Link>;
|
|
}
|
|
}
|
|
|
|
UserLink.propTypes = propTypes;
|
|
|
|
export default UserLink;
|