mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
27 lines
675 B
TypeScript
27 lines
675 B
TypeScript
import React, { FC } from 'react';
|
|
|
|
import { Avatar } from '~/components/common/Avatar';
|
|
import { MenuButton } from '~/components/menu';
|
|
import { ProfileQuickInfo } from '~/containers/profile/ProfileQuickInfo';
|
|
import { IUser } from '~/types/auth';
|
|
import { path } from '~/utils/ramda';
|
|
|
|
interface Props {
|
|
user: IUser;
|
|
className?: string;
|
|
}
|
|
|
|
const CommentAvatar: FC<Props> = ({ user, className }) => {
|
|
return (
|
|
<MenuButton
|
|
position="auto"
|
|
icon={
|
|
<Avatar url={path(['photo', 'url'], user)} username={user.username} className={className} />
|
|
}
|
|
>
|
|
<ProfileQuickInfo user={user} />
|
|
</MenuButton>
|
|
);
|
|
};
|
|
|
|
export { CommentAvatar };
|