2023-04-16 07:00:42 +02:00
|
|
|
import { Avatar, Col, Row } from 'antd';
|
2022-09-07 09:00:28 +02:00
|
|
|
import React, { FC } from 'react';
|
2022-12-13 07:54:29 +01: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-12 03:29:58 +02:00
|
|
|
|
2022-09-07 09:00:28 +02:00
|
|
|
export type SingleFollowerProps = {
|
2022-07-12 03:29:58 +02:00
|
|
|
follower: Follower;
|
2022-09-07 09:00:28 +02:00
|
|
|
};
|
2022-07-12 03:29:58 +02:00
|
|
|
|
2022-09-07 09:00:28 +02:00
|
|
|
export const SingleFollower: FC<SingleFollowerProps> = ({ follower }) => (
|
2023-04-16 07:32:57 +02:00
|
|
|
<div>
|
2022-09-07 09:00:28 +02:00
|
|
|
<a href={follower.link} target="_blank" rel="noreferrer">
|
2023-04-16 07:32:57 +02:00
|
|
|
<Row wrap={false} className={cn([styles.follower, 'followers-follower'])}>
|
2023-04-16 07:00:42 +02:00
|
|
|
<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()}
|
2023-03-24 03:11:08 +01:00
|
|
|
</Avatar>
|
2022-09-07 09:00:28 +02:00
|
|
|
</Col>
|
2023-04-16 07:00:42 +02:00
|
|
|
<Col>
|
|
|
|
<Row className={styles.username}>
|
|
|
|
{follower.name || follower.username.split('@', 2)[0]}
|
2023-02-05 05:45:31 +01:00
|
|
|
</Row>
|
2023-04-16 07:00:42 +02:00
|
|
|
<Row className={styles.account}>{follower.username}</Row>
|
2022-09-07 09:00:28 +02:00
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
);
|