1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 22:01:06 +00:00
Files
seahub/frontend/src/pages/sys-admin/user-link.js
Michael An 14ce391007 Fix eslint warnings (#5635)
* 01 fix eslint warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings
2023-09-13 08:40:50 +08:00

21 lines
489 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/users/${encodeURIComponent(this.props.email)}/`}>{this.props.name}</Link>;
}
}
UserLink.propTypes = propTypes;
export default UserLink;