make sure to show correct url on winning search term

This commit is contained in:
Sean Yesmunt 2020-02-11 14:32:49 -05:00
parent c8451483b3
commit 24b29f341b
3 changed files with 5 additions and 4 deletions

View file

@ -224,7 +224,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
'claim-preview__wrapper--small': type === 'small',
})}
>
{type !== 'large' && type !== 'inline' && <ClaimRepostAuthor uri={uri} />}
<ClaimRepostAuthor uri={uri} />
<div
className={classnames('claim-preview', {

View file

@ -9,16 +9,17 @@ type Props = {
uri: string,
doToast: ({ message: string }) => void,
inline?: boolean,
noShortUrl?: boolean,
};
function ClaimUri(props: Props) {
const { shortUrl, uri, doToast, inline = false } = props;
const { shortUrl, uri, doToast, inline = false, noShortUrl = false } = props;
return (
<Button
className={classnames('media__uri', { 'media__uri--inline': inline })}
button="alt"
label={shortUrl || uri}
label={noShortUrl ? uri : shortUrl || uri}
onClick={() => {
clipboard.writeText(shortUrl || uri);
doToast({

View file

@ -54,7 +54,7 @@ export default function SearchPage(props: Props) {
<Fragment>
<header className="search__header">
<div className="claim-preview__actions--header">
<ClaimUri uri={uriFromQuery} />
<ClaimUri uri={uriFromQuery} noShortUrl />
<Button
className="media__uri--right"
button="alt"