mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
21 lines
594 B
TypeScript
21 lines
594 B
TypeScript
import {currentUser, requiredCurrentUser} from "@/auth/current-user";
|
|
import {Avatar, AvatarFallback, AvatarImage} from "@/components/ui/avatar";
|
|
|
|
export type UserAvatarProps = {}
|
|
|
|
export const UserAvatar = async () => {
|
|
|
|
const user = await currentUser()
|
|
|
|
|
|
return (
|
|
<div>
|
|
<Avatar className="size-6">
|
|
<AvatarFallback>{user.name?.[0]}</AvatarFallback>
|
|
{user.image ? (
|
|
<AvatarImage src={user.image} alt={`${user.name ?? "-"}'s profile picture`}/>
|
|
) : null}
|
|
</Avatar>
|
|
</div>
|
|
)
|
|
} |