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