diff options
author | Sascha <GlancingMind@outlook.com> | 2021-03-20 15:13:10 +0100 |
---|---|---|
committer | Sascha <GlancingMind@outlook.com> | 2021-04-13 19:07:57 +0200 |
commit | 41e85023019bc13c06a1de2c431e0bd920e9e29a (patch) | |
tree | 95ea962e484912538f3b8611d3eb54056bbf3658 /webui/src/components/Author.tsx | |
parent | 998ae348b10efd5af758944143b70125a98e8f86 (diff) | |
download | git-bug-41e85023019bc13c06a1de2c431e0bd920e9e29a.tar.gz |
Use profile page for each identity
Authorcomponent links to the authors profile page.
Replace pofile buglist with statistics
Diffstat (limited to 'webui/src/components/Author.tsx')
-rw-r--r-- | webui/src/components/Author.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/webui/src/components/Author.tsx b/webui/src/components/Author.tsx index d60e8969..272ca5b5 100644 --- a/webui/src/components/Author.tsx +++ b/webui/src/components/Author.tsx @@ -1,6 +1,8 @@ import React from 'react'; +import { Link as RouterLink } from 'react-router-dom'; import MAvatar from '@material-ui/core/Avatar'; +import Link from '@material-ui/core/Link'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; import { AuthoredFragment } from '../graphql/fragments.generated'; @@ -11,13 +13,11 @@ type Props = AuthoredFragment & { }; const Author = ({ author, ...props }: Props) => { - if (!author.email) { - return <span {...props}>{author.displayName}</span>; - } - return ( - <Tooltip title={author.email}> - <span {...props}>{author.displayName}</span> + <Tooltip title={`Goto the ${author.displayName}'s profile.`}> + <Link {...props} component={RouterLink} to={`/user/${author.humanId}`}> + {author.displayName} + </Link> </Tooltip> ); }; |