Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show author of PR/issue in link tooltip #597

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion webapp/src/components/link_tooltip/link_tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ export const LinkTooltip = ({href, connected, show, theme}) => {
if (data) {
let date = new Date(data.created_at);
date = date.toDateString();

let userName = '';
if (data.user) {
userName = data.user.login;
} else if (data.owner) {
userName = data.owner.login;
}

return (
<div className='github-tooltip'>
<div
Expand All @@ -97,7 +105,7 @@ export const LinkTooltip = ({href, connected, show, theme}) => {
{data.repo}
</span>
{' on '}
<span>{date}</span>
<span>{date + ' by ' + userName}</span>
hanzei marked this conversation as resolved.
Show resolved Hide resolved
</div>

<div className='body d-flex mt-2'>
Expand Down