From 3d7eee99fb843d0594382b119065171c54a84d4f Mon Sep 17 00:00:00 2001 From: Developing-Gamer Date: Wed, 27 May 2026 12:47:47 -0700 Subject: [PATCH] Add team icon component for dashboard account settings. Co-authored-by: Cursor --- .../supporting/team-icon.tsx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 apps/dashboard/src/components/dashboard-account-settings/supporting/team-icon.tsx diff --git a/apps/dashboard/src/components/dashboard-account-settings/supporting/team-icon.tsx b/apps/dashboard/src/components/dashboard-account-settings/supporting/team-icon.tsx new file mode 100644 index 000000000..ebb6c2a04 --- /dev/null +++ b/apps/dashboard/src/components/dashboard-account-settings/supporting/team-icon.tsx @@ -0,0 +1,31 @@ +'use client'; + +import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; +import { User } from "@phosphor-icons/react"; +import { Team } from "@stackframe/stack"; + +export function TeamIcon(props: { team: Team | 'personal' }) { + if (props.team === 'personal') { + return ( +
+ +
+ ); + } + if (props.team.profileImageUrl) { + return ( + + + + {props.team.displayName.slice(0, 1).toUpperCase()} + + + ); + } else { + return ( +
+ {props.team.displayName.slice(0, 1).toUpperCase()} +
+ ); + } +}