fix(followers): improve layout of single follower. Closes #2926

This commit is contained in:
Gabe Kangas
2023-04-15 22:00:42 -07:00
parent bb81ac704c
commit 014acc1663
2 changed files with 41 additions and 44 deletions

View File

@@ -1,4 +1,4 @@
import { Avatar, Col, Row, Typography } from 'antd';
import { Avatar, Col, Row } from 'antd';
import React, { FC } from 'react';
import cn from 'classnames';
import { Follower } from '../../../../interfaces/follower';
@@ -12,20 +12,21 @@ export const SingleFollower: FC<SingleFollowerProps> = ({ follower }) => (
<div className={cn([styles.follower, 'followers-follower'])}>
<a href={follower.link} target="_blank" rel="noreferrer">
<Row wrap={false}>
<Col span={6}>
<Avatar src={follower.image} size="large" alt="Avatar" className={styles.avatar}>
{follower.username.charAt(0).toUpperCase()}
<Col span={6} className={styles.avatarColumn}>
<Avatar
src={follower.image}
alt={(follower.name || follower.username).charAt(0).toUpperCase()}
className={styles.avatar}
size="large"
>
{(follower.name || follower.username).charAt(0).toUpperCase()}
</Avatar>
</Col>
<Col span={16}>
<Row className={styles.name}>
<Typography.Text ellipsis>
{follower.name || follower.username.split('@', 2)[0]}
</Typography.Text>
</Row>
<Row className={styles.account}>
<Typography.Text ellipsis>{follower.username}</Typography.Text>
<Col>
<Row className={styles.username}>
{follower.name || follower.username.split('@', 2)[0]}
</Row>
<Row className={styles.account}>{follower.username}</Row>
</Col>
</Row>
</a>