feat: format highlight source url
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user