mirror of
https://github.com/System-End/site.git
synced 2026-04-19 15:18:18 +00:00
Fix StaticMention component name (#297)
This commit is contained in:
parent
e86b748917
commit
28d22ebcd8
2 changed files with 31 additions and 29 deletions
|
|
@ -1,32 +1,34 @@
|
|||
import Link from 'next/link'
|
||||
import { memo } from 'react'
|
||||
|
||||
export const StaticMention = memo(({ avatar, username, link }) => (
|
||||
<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>
|
||||
))
|
||||
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>
|
||||
)
|
||||
})
|
||||
|
||||
StaticMention.displayName = 'StaticMention';
|
||||
export default StaticMention
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Letterhead from '../../components/letterhead'
|
||||
import Link from 'next/link'
|
||||
import { memo, useState, useEffect } from 'react'
|
||||
import { StaticMention } from '../../components/mention'
|
||||
import StaticMention from '../../components/mention'
|
||||
|
||||
<Letterhead
|
||||
title="The Sun Sets on the Summer of Making"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue