* chore: Remove all avatar/logo references * Updated user profile to only use avatarUrl * fix: minor style issue * chore: Remove redundant includeTeamLogo * fix: Use right avatar default in event type list * fix: placeholder avatar team profile, target * chore: Add logoUrl/avatarUrl to JWT * fix: Bunch of org avatar issues, fix members list * Fix logoUrl on org pages * More type fixes * Hopefully final type fixes * Another round of type fixes * fix: UserForm ts * fix: Handle as return types, not input types * fix: Remove profile and add avatarUrl * fix: notFound as const * fix: Seeder avatarUrl params * revert: Migration changes for easier recovery * fix: Add explicit type to builder as avatar is now set * Add logoUrl to unpublished entity * Avatar test out of scope here * fix: Use the new avatarUrl after save * chore: Removed getOrgAvatarUrl/getTeamAvatarUrl * fix: Update sidebar image immediately after change * Unable to safe unnamed user, so default * fix: Unpublished page, add organization test * Add more tests
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
import { EmptyScreen, Avatar } from "@calcom/ui";
|
|
|
|
export type UnpublishedEntityProps = {
|
|
/**
|
|
* If it is passed, don't pass orgSlug
|
|
* It conveys two things - Slug for the team and that it is not an organization
|
|
*/
|
|
teamSlug?: string | null;
|
|
/**
|
|
* If it is passed, don't pass teamSlug.
|
|
* It conveys two things - Slug for the team and that it is an organization infact
|
|
*/
|
|
orgSlug?: string | null;
|
|
/* logo url for entity */
|
|
logoUrl?: string | null;
|
|
/**
|
|
* Team or Organization name
|
|
*/
|
|
name?: string | null;
|
|
};
|
|
|
|
export function UnpublishedEntity(props: UnpublishedEntityProps) {
|
|
const { t } = useLocale();
|
|
const slug = props.orgSlug || props.teamSlug;
|
|
return (
|
|
<div className="m-8 flex items-center justify-center">
|
|
<EmptyScreen
|
|
avatar={<Avatar alt={slug ?? ""} imageSrc={getPlaceholderAvatar(props.logoUrl, slug)} size="lg" />}
|
|
headline={t("team_is_unpublished", {
|
|
team: props.name,
|
|
})}
|
|
description={t(`${props.orgSlug ? "org" : "team"}_is_unpublished_description`)}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|