2
0

first commit

This commit is contained in:
2024-08-09 00:39:27 +02:00
commit 79688abe2e
5698 changed files with 497838 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
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>
);
}