make sure to show correct url on winning search term
This commit is contained in:
parent
c8451483b3
commit
24b29f341b
3 changed files with 5 additions and 4 deletions
|
@ -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', {
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue