don't resolve all comment author uris

This commit is contained in:
Sean Yesmunt 2021-04-29 15:30:45 -04:00
parent 3808c61148
commit f04267ffc6

View file

@ -1,13 +1,14 @@
// @flow // @flow
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import React from 'react'; import React from 'react';
import { parseURI } from 'lbry-redux';
import MarkdownPreview from 'component/common/markdown-preview'; import MarkdownPreview from 'component/common/markdown-preview';
import ChannelThumbnail from 'component/channelThumbnail'; import ChannelThumbnail from 'component/channelThumbnail';
import { Menu, MenuButton } from '@reach/menu-button'; import { Menu, MenuButton } from '@reach/menu-button';
import Icon from 'component/common/icon'; import Icon from 'component/common/icon';
import classnames from 'classnames'; import classnames from 'classnames';
import CommentMenuList from 'component/commentMenuList'; import CommentMenuList from 'component/commentMenuList';
import UriIndicator from 'component/uriIndicator'; import Button from 'component/button';
import CreditAmount from 'component/common/credit-amount'; import CreditAmount from 'component/common/credit-amount';
type Props = { type Props = {
@ -25,6 +26,7 @@ function Comment(props: Props) {
const { claim, uri, authorUri, message, commentIsMine, commentId, stakedLevel, supportAmount } = props; const { claim, uri, authorUri, message, commentIsMine, commentId, stakedLevel, supportAmount } = props;
const [mouseIsHovering, setMouseHover] = React.useState(false); const [mouseIsHovering, setMouseHover] = React.useState(false);
const commentByOwnerOfContent = claim && claim.signing_channel && claim.signing_channel.permanent_url === authorUri; const commentByOwnerOfContent = claim && claim.signing_channel && claim.signing_channel.permanent_url === authorUri;
const { claimName } = parseURI(authorUri);
return ( return (
<li <li
@ -44,14 +46,15 @@ function Comment(props: Props) {
<div className="livestream-comment__body"> <div className="livestream-comment__body">
{supportAmount > 0 && <ChannelThumbnail uri={authorUri} xsmall />} {supportAmount > 0 && <ChannelThumbnail uri={authorUri} xsmall />}
<div className="livestream-comment__info"> <div className="livestream-comment__info">
<UriIndicator <Button
className={classnames('comment__author', { className={classnames('button--uri-indicator comment__author', {
'comment__author--creator': commentByOwnerOfContent, 'comment__author--creator': commentByOwnerOfContent,
})} })}
link target="_blank"
external navigate={authorUri}
uri={authorUri} >
/> {claimName}
</Button>
<div className="livestream-comment__text"> <div className="livestream-comment__text">
<MarkdownPreview content={message} promptLinks stakedLevel={stakedLevel} /> <MarkdownPreview content={message} promptLinks stakedLevel={stakedLevel} />