fix: Avatars not showing when using bookings filter (#15271)
This commit is contained in:
1 parent
dd24100035
commit
23bb06cc36
9 files changed
+14
-34
No files matched your search
@@ -2,7 +2,6 @@ import type { PropsWithChildren } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
|
||||
import type { RouterOutputs } from "@calcom/trpc";
|
||||
import { Avatar, TextField } from "@calcom/ui";
|
||||
|
||||
@@ -65,7 +64,6 @@ function UserToInviteItem({
|
||||
isSelected: boolean;
|
||||
onChange: () => void;
|
||||
}) {
|
||||
const bookerUrl = useBookerUrl();
|
||||
return (
|
||||
<div
|
||||
key={member.userId}
|
||||
@@ -75,12 +73,7 @@ function UserToInviteItem({
|
||||
isSelected ? "bg-emphasis" : "hover:bg-subtle "
|
||||
)}>
|
||||
<div className="flex items-center space-x-2 rtl:space-x-reverse">
|
||||
<Avatar
|
||||
size="sm"
|
||||
alt="Users avatar"
|
||||
asChild
|
||||
imageSrc={`${bookerUrl}/${member.user.username}/avatar.png`}
|
||||
/>
|
||||
<Avatar size="sm" alt="Users avatar" asChild imageSrc={member.user.avatarUrl} />
|
||||
<label
|
||||
htmlFor={`${member.user.id}`}
|
||||
className="text-emphasis cursor-pointer text-sm font-medium leading-none">
|
||||
|
||||
@@ -15,6 +15,7 @@ interface Props {
|
||||
bio?: string | null;
|
||||
hideBranding?: boolean | undefined;
|
||||
role: MembershipRole;
|
||||
logoUrl?: string | null;
|
||||
accepted: boolean;
|
||||
}[];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { MembershipRole } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
@@ -20,6 +20,7 @@ interface Props {
|
||||
name?: string | null;
|
||||
slug?: string | null;
|
||||
bio?: string | null;
|
||||
logoUrl?: string | null;
|
||||
hideBranding?: boolean | undefined;
|
||||
role: MembershipRole;
|
||||
accepted: boolean;
|
||||
@@ -64,7 +65,7 @@ export default function TeamInviteListItem(props: Props) {
|
||||
<div className="flex">
|
||||
<Avatar
|
||||
size="mdLg"
|
||||
imageSrc={`${WEBAPP_URL}/team/${team.slug}/avatar.png`}
|
||||
imageSrc={getPlaceholderAvatar(team.logoUrl, team.name)}
|
||||
alt="Team Logo"
|
||||
className=""
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user