Files
homarr/apps/nextjs/src/components/user-avatar.tsx
T
2026-01-09 13:10:52 +01:00

24 lines
547 B
TypeScript

import type { MantineSize } from "@mantine/core";
import { auth } from "@homarr/auth/next";
import { UserAvatar } from "@homarr/ui";
interface CurrentUserAvatarProps {
size: MantineSize;
}
export const CurrentUserAvatar = async ({ size }: CurrentUserAvatarProps) => {
const currentSession = await auth();
return (
<UserAvatar
user={{
name: currentSession?.user.name ?? null,
image: currentSession?.user.image ?? null,
email: currentSession?.user.email ?? null,
}}
size={size}
/>
);
};