2023-02-05 07:45:31 +03:00
|
|
|
import { Avatar, Col, Row, Typography } from 'antd';
|
2022-09-07 10:00:28 +03:00
|
|
|
import React, { FC } from 'react';
|
2022-12-13 09:54:29 +03:00
|
|
|
import cn from 'classnames';
|
2022-09-03 21:38:52 +03:00
|
|
|
import { Follower } from '../../../../interfaces/follower';
|
2022-09-07 10:00:28 +03:00
|
|
|
import styles from './SingleFollower.module.scss';
|
2022-07-12 04:29:58 +03:00
|
|
|
|
2022-09-07 10:00:28 +03:00
|
|
|
export type SingleFollowerProps = {
|
2022-07-12 04:29:58 +03:00
|
|
|
follower: Follower;
|
2022-09-07 10:00:28 +03:00
|
|
|
};
|
2022-07-12 04:29:58 +03:00
|
|
|
|
2022-09-07 10:00:28 +03:00
|
|
|
export const SingleFollower: FC<SingleFollowerProps> = ({ follower }) => (
|
2022-12-13 09:54:29 +03:00
|
|
|
<div className={cn([styles.follower, 'followers-follower'])}>
|
2022-09-07 10:00:28 +03:00
|
|
|
<a href={follower.link} target="_blank" rel="noreferrer">
|
|
|
|
<Row wrap={false}>
|
2023-03-24 05:11:08 +03:00
|
|
|
<Col span={6}>
|
|
|
|
<Avatar src={follower.image} size="large" alt="Avatar" className={styles.avatar}>
|
|
|
|
{follower.username.charAt(0).toUpperCase()}
|
|
|
|
</Avatar>
|
2022-09-07 10:00:28 +03:00
|
|
|
</Col>
|
2023-03-24 05:11:08 +03:00
|
|
|
<Col span={16}>
|
2023-02-05 07:45:31 +03:00
|
|
|
<Row className={styles.name}>
|
2023-02-23 09:07:56 +03:00
|
|
|
<Typography.Text ellipsis>
|
|
|
|
{follower.name || follower.username.split('@', 2)[0]}
|
|
|
|
</Typography.Text>
|
2023-02-05 07:45:31 +03:00
|
|
|
</Row>
|
|
|
|
<Row className={styles.account}>
|
|
|
|
<Typography.Text ellipsis>{follower.username}</Typography.Text>
|
|
|
|
</Row>
|
2022-09-07 10:00:28 +03:00
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
);
|