fix: profile loading fix in org (#11618)
Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
1 parent
e1f47ef40e
commit
4a81b59fc9
4 files changed
+40
-6
No files matched your search
@@ -9,6 +9,7 @@ type OrganizationAvatarProps = AvatarProps & {
|
||||
const OrganizationAvatar = ({ size, imageSrc, alt, organizationSlug, ...rest }: OrganizationAvatarProps) => {
|
||||
return (
|
||||
<Avatar
|
||||
data-testid="organization-avatar"
|
||||
size={size}
|
||||
imageSrc={imageSrc}
|
||||
alt={alt}
|
||||
|
||||
@@ -20,6 +20,7 @@ export type AvatarProps = {
|
||||
accepted?: boolean;
|
||||
asChild?: boolean; // Added to ignore the outer span on the fallback component - messes up styling
|
||||
indicator?: React.ReactNode;
|
||||
"data-testid"?: string;
|
||||
};
|
||||
|
||||
const sizesPropsBySize = {
|
||||
@@ -38,6 +39,7 @@ export function Avatar(props: AvatarProps) {
|
||||
const rootClass = classNames("aspect-square rounded-full", sizesPropsBySize[size]);
|
||||
let avatar = (
|
||||
<AvatarPrimitive.Root
|
||||
data-testid={props?.["data-testid"]}
|
||||
className={classNames(
|
||||
"bg-emphasis item-center relative inline-flex aspect-square justify-center rounded-full",
|
||||
indicator ? "overflow-visible" : "overflow-hidden",
|
||||
|
||||
Reference in new issue
Block a user