parent
4b98992257
commit
ab11f206d8
12 changed files with 58 additions and 23 deletions
|
@ -9,6 +9,7 @@ import {UserAvatar} from './UserAvatar'
|
|||
import {observer} from 'mobx-react-lite'
|
||||
import {FollowButton} from '../profile/FollowButton'
|
||||
import {FollowState} from 'state/models/cache/my-follows'
|
||||
import {sanitizeDisplayName} from 'lib/strings/display-names'
|
||||
|
||||
interface PostMetaOpts {
|
||||
authorAvatar?: string
|
||||
|
@ -52,7 +53,7 @@ export const PostMeta = observer(function (opts: PostMetaOpts) {
|
|||
style={pal.text}
|
||||
numberOfLines={1}
|
||||
lineHeight={1.2}
|
||||
text={displayName}
|
||||
text={sanitizeDisplayName(displayName)}
|
||||
href={`/profile/${opts.authorHandle}`}
|
||||
/>
|
||||
<Text type="md" style={pal.textLight} lineHeight={1.2}>
|
||||
|
@ -103,7 +104,7 @@ export const PostMeta = observer(function (opts: PostMetaOpts) {
|
|||
lineHeight={1.2}
|
||||
text={
|
||||
<>
|
||||
{displayName}
|
||||
{sanitizeDisplayName(displayName)}
|
||||
<Text type="md" style={[pal.textLight]}>
|
||||
{handle}
|
||||
</Text>
|
||||
|
|
|
@ -6,6 +6,7 @@ import {Text} from './text/Text'
|
|||
import {LoadingPlaceholder} from './LoadingPlaceholder'
|
||||
import {useStores} from 'state/index'
|
||||
import {TypographyVariant} from 'lib/ThemeContext'
|
||||
import {sanitizeDisplayName} from 'lib/strings/display-names'
|
||||
|
||||
export function UserInfoText({
|
||||
type = 'md',
|
||||
|
@ -68,7 +69,9 @@ export function UserInfoText({
|
|||
lineHeight={1.2}
|
||||
numberOfLines={1}
|
||||
href={`/profile/${profile.handle}`}
|
||||
text={`${prefix || ''}${profile[attr] || profile.handle}`}
|
||||
text={`${prefix || ''}${sanitizeDisplayName(
|
||||
profile[attr] || profile.handle,
|
||||
)}`}
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue