fix: More instances of wrong avatar URL fixed (#10519)

* Fix user.avatar

* Fix avtars in admin users listing

* Handle unpublished org
This commit is contained in:
Hariom Balhara authored and GitHub committed 2023-08-03 15:32:38 +00:00
1 parent 5491821baf
commit bf45dcf139
5 files changed
+27 -15

No files matched your search

@@ -1,5 +1,7 @@
import { ALLOWED_HOSTNAMES, RESERVED_SUBDOMAINS, WEBAPP_URL } from "@calcom/lib/constants";
import type { Prisma } from ".prisma/client";
/**
* return the org slug
* @param hostname
@@ -60,5 +62,5 @@ export function getSlugOrRequestedSlug(slug: string) {
},
},
],
};
} satisfies Prisma.TeamWhereInput;
}
@@ -135,7 +135,7 @@ function UsersTableBare() {
size="md"
alt={`Avatar of ${user.username || "Nameless"}`}
gravatarFallbackMd5=""
imageSrc={`${WEBAPP_URL}/${user.username}/avatar.png`}
imageSrc={`${WEBAPP_URL}/${user.username}/avatar.png?orgId=${user.organizationId}`}
/>
<div className="text-subtle ml-4 font-medium">