Merge pull request #14615 from jsundquist/master
fix(search): update to only link title in search results
This commit is contained in:
@@ -64,21 +64,23 @@ export function AdrSearchResultListItem(props: {
|
||||
};
|
||||
|
||||
return (
|
||||
<Link noTrack to={result.location} onClick={handleClick}>
|
||||
<>
|
||||
<ListItem alignItems="flex-start" className={classes.flexContainer}>
|
||||
<ListItemText
|
||||
className={classes.itemText}
|
||||
primaryTypographyProps={{ variant: 'h6' }}
|
||||
primary={
|
||||
highlight?.fields.title ? (
|
||||
<HighlightedSearchResultText
|
||||
text={highlight.fields.title}
|
||||
preTag={highlight.preTag}
|
||||
postTag={highlight.postTag}
|
||||
/>
|
||||
) : (
|
||||
result.title
|
||||
)
|
||||
<Link noTrack to={result.location} onClick={handleClick}>
|
||||
{highlight?.fields.title ? (
|
||||
<HighlightedSearchResultText
|
||||
text={highlight?.fields.title || ''}
|
||||
preTag={highlight?.preTag || ''}
|
||||
postTag={highlight?.postTag || ''}
|
||||
/>
|
||||
) : (
|
||||
result.title
|
||||
)}
|
||||
</Link>
|
||||
}
|
||||
secondary={
|
||||
<span
|
||||
@@ -116,6 +118,6 @@ export function AdrSearchResultListItem(props: {
|
||||
</Box>
|
||||
</ListItem>
|
||||
<Divider component="li" />
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user