feat: format highlight source url
This commit is contained in:
parent
28dad7373f
commit
bd3dc894c4
3 changed files with 37 additions and 36 deletions
|
|
@ -10,6 +10,7 @@ import { useMemo } from 'react'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import Content from '../Content'
|
||||
import ContentPreview from '../ContentPreview'
|
||||
import ExternalLink from '../ExternalLink'
|
||||
import UserAvatar from '../UserAvatar'
|
||||
|
||||
export default function Highlight({ event, className }: { event: Event; className?: string }) {
|
||||
|
|
@ -99,15 +100,10 @@ function HighlightSource({ event }: { event: Event }) {
|
|||
return (
|
||||
<div className="truncate text-muted-foreground">
|
||||
{t('From')}{' '}
|
||||
<a
|
||||
href={sourceTag[1]}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="underline text-muted-foreground hover:text-foreground"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{sourceTag[1]}
|
||||
</a>
|
||||
<ExternalLink
|
||||
url={sourceTag[1]}
|
||||
className="underline italic text-muted-foreground hover:text-foreground"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue