mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-22 15:09:16 -05:00
23 lines
473 B
TypeScript
23 lines
473 B
TypeScript
import { Avatar, AvatarProps } from "@chakra-ui/react";
|
|
import React from "react";
|
|
|
|
interface Props {
|
|
twitterName: string;
|
|
isSmall?: boolean;
|
|
}
|
|
|
|
const TwitterAvatar: React.FC<Props & AvatarProps> = ({
|
|
twitterName,
|
|
isSmall,
|
|
...props
|
|
}) => (
|
|
<Avatar
|
|
name={twitterName}
|
|
src={`https://api.microlink.io/?url=https://twitter.com/${twitterName}&s;embed=image.url`}
|
|
size={isSmall ? "sm" : undefined}
|
|
{...props}
|
|
/>
|
|
);
|
|
|
|
export default TwitterAvatar;
|