fix: Unpublished screens (#10453)
* Implementation * Changes and e2e * Reverting launch.json * Reverting org create handler * Reverting yarn.lock * DRYness and nitpicks * Default org domain to undefined * Applying zomars suggestion * Suggestions * Fixing seed and type in suggestion * Fixing types --------- Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
4435451e9b
commit
4a6dc50909
29 files changed
+503
-161
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { EmptyScreen, Avatar } from "@calcom/ui";
|
||||
|
||||
export type UnpublishedEntityProps = {
|
||||
teamSlug?: string | null;
|
||||
orgSlug?: string | null;
|
||||
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={`/team/${slug}/avatar.png`} size="lg" />}
|
||||
headline={t("team_is_unpublished", {
|
||||
team: props.name,
|
||||
})}
|
||||
description={t("team_is_unpublished_description", {
|
||||
entity: props.orgSlug ? t("organization").toLowerCase() : t("team").toLowerCase(),
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export { UnpublishedEntity } from "./UnpublishedEntity";
|
||||
export type { UnpublishedEntityProps } from "./UnpublishedEntity";
|
||||
@@ -83,6 +83,7 @@ export type { AlertProps } from "./components/alert";
|
||||
export { Credits } from "./components/credits";
|
||||
export { Divider, VerticalDivider } from "./components/divider";
|
||||
export { EmptyScreen } from "./components/empty-screen";
|
||||
export { UnpublishedEntity } from "./components/unpublished-entity";
|
||||
export { List, ListItem, ListItemText, ListItemTitle, ListLinkItem } from "./components/list";
|
||||
export type { ListItemProps, ListProps } from "./components/list";
|
||||
export { HeadSeo } from "./components/head-seo";
|
||||
|
||||
Reference in new issue
Block a user