fix: crash with no user in session
This commit is contained in:
@@ -14,7 +14,7 @@ export const UserAvatar = async ({ size }: UserAvatarProps) => {
|
|||||||
color: "primaryColor",
|
color: "primaryColor",
|
||||||
} satisfies Partial<AvatarProps>;
|
} satisfies Partial<AvatarProps>;
|
||||||
|
|
||||||
if (!currentSession) return <Avatar {...commonProps} />;
|
if (!currentSession?.user) return <Avatar {...commonProps} />;
|
||||||
if (currentSession.user.image)
|
if (currentSession.user.image)
|
||||||
return (
|
return (
|
||||||
<Avatar
|
<Avatar
|
||||||
|
|||||||
Reference in New Issue
Block a user