Skip to content

Commit 8caa062

Browse files
fix: replace Image with Avatar for org/team logos in settings sidebar (calcom#28418)
Co-authored-by: Sahitya Chandra <sahityajb@gmail.com>
1 parent f2a4427 commit 8caa062

1 file changed

Lines changed: 14 additions & 17 deletions

File tree

apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import type { VerticalTabItemProps } from "@calcom/ui/components/navigation";
2828
import { VerticalTabItem } from "@calcom/ui/components/navigation";
2929
import { Skeleton } from "@calcom/ui/components/skeleton";
3030
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@radix-ui/react-collapsible";
31-
import Image from "next/image";
31+
import { Avatar } from "@calcom/ui/components/avatar";
3232
import Link from "next/link";
3333
import { usePathname, useRouter } from "next/navigation";
3434
import { useSession } from "next-auth/react";
@@ -622,12 +622,11 @@ const TeamListCollapsible = ({ teamFeatures }: { teamFeatures?: Record<number, T
622622
</div>
623623
{}
624624
{!team.parentId && (
625-
<Image
626-
src={getPlaceholderAvatar(team.logoUrl, team.name)}
627-
width={16}
628-
height={16}
629-
className="self-start rounded-full stroke-[2px] ltr:mr-2 rtl:ml-2 md:mt-0"
625+
<Avatar
626+
size="xs"
627+
imageSrc={getPlaceholderAvatar(team.logoUrl, team.name)}
630628
alt={team.name || "Team logo"}
629+
className="self-start border-0 bg-transparent ltr:mr-2 rtl:ml-2 md:mt-0"
631630
/>
632631
)}
633632
<p className="w-1/2 truncate leading-normal">{team.name}</p>
@@ -813,12 +812,11 @@ const SettingsSidebarContainer = ({
813812
)}
814813
{}
815814
{!tab.icon && tab?.avatar && (
816-
<Image
817-
width={16}
818-
height={16}
819-
className="rounded-full ltr:mr-3 rtl:ml-3"
820-
src={tab?.avatar}
821-
alt="Organization Logo"
815+
<Avatar
816+
size="xs"
817+
imageSrc={tab?.avatar}
818+
alt={tab.name || "Organization Logo"}
819+
className="border-0 bg-transparent ltr:mr-3 rtl:ml-3"
822820
/>
823821
)}
824822
<Skeleton
@@ -969,12 +967,11 @@ const SettingsSidebarContainer = ({
969967
</div>
970968
{}
971969
{!otherTeam.parentId && (
972-
<Image
973-
src={getPlaceholderAvatar(otherTeam.logoUrl, otherTeam.name)}
974-
width={16}
975-
height={16}
976-
className="self-start rounded-full stroke-[2px] ltr:mr-2 rtl:ml-2 md:mt-0"
970+
<Avatar
971+
size="xs"
972+
imageSrc={getPlaceholderAvatar(otherTeam.logoUrl, otherTeam.name)}
977973
alt={otherTeam.name || "Team logo"}
974+
className="self-start border-0 bg-transparent ltr:mr-2 rtl:ml-2 md:mt-0"
978975
/>
979976
)}
980977
<p className="w-1/2 truncate leading-normal">{otherTeam.name}</p>

0 commit comments

Comments
 (0)