mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
17 lines
499 B
TypeScript
17 lines
499 B
TypeScript
import RoundedImage from '~/components/common/rounded_image';
|
|
import { Item } from '~/components/dashboard/side_nav/nav_item';
|
|
import useUser from '~/hooks/use_user';
|
|
|
|
export default function UserCard() {
|
|
const { user, isAuthenticated } = useUser();
|
|
const altImage = `${user?.nickName}'s avatar`;
|
|
return (
|
|
isAuthenticated && (
|
|
<Item className="disable-hover">
|
|
<RoundedImage src={user.avatarUrl} width={24} alt={altImage} />
|
|
{user.nickName}
|
|
</Item>
|
|
)
|
|
);
|
|
}
|