mirror of
https://github.com/System-End/site.git
synced 2026-04-20 00:25:19 +00:00
34 lines
744 B
JavaScript
34 lines
744 B
JavaScript
import Link from 'next/link'
|
|
import { memo } from 'react'
|
|
|
|
const StaticMention = memo(function StaticMention({ avatar, username, link }) {
|
|
return (
|
|
<Link href={link}>
|
|
<a
|
|
className={`mention`}
|
|
style={{
|
|
display: 'inline-flex',
|
|
alignItems: 'baseline',
|
|
textDecoration: 'none'
|
|
}}
|
|
>
|
|
{avatar && (
|
|
<img
|
|
src={avatar}
|
|
alt={username}
|
|
width={24}
|
|
className="mention-avatar"
|
|
style={{
|
|
borderRadius: '50%',
|
|
marginRight: '4px',
|
|
alignSelf: 'flex-end'
|
|
}}
|
|
/>
|
|
)}
|
|
@{username}
|
|
</a>
|
|
</Link>
|
|
)
|
|
})
|
|
|
|
export default StaticMention
|