diff --git a/apps/web/pages/[user].tsx b/apps/web/pages/[user].tsx index ed5375f41b..d88e9d7a87 100644 --- a/apps/web/pages/[user].tsx +++ b/apps/web/pages/[user].tsx @@ -13,6 +13,7 @@ import { useEmbedStyles, useIsEmbed, } from "@calcom/embed-core/embed-iframe"; +import EmptyPage from "@calcom/features/eventtypes/components/EmptyPage"; import CustomBranding from "@calcom/lib/CustomBranding"; import defaultEvents, { getDynamicEventDescription, @@ -103,7 +104,7 @@ export default function User(props: inferSSRProps & E telemetry.event(telemetryEventTypes.embedView, collectPageParameters("/[user]")); } }, [telemetry, router.asPath]); - + const isEventListEmpty = eventTypes.length === 0; return ( <> & E )}
{user.away ? (
@@ -195,16 +200,7 @@ export default function User(props: inferSSRProps & E )) )}
- {eventTypes.length === 0 && ( -
-
-

- {t("uh_oh") as string} -

-

{t("no_event_types_have_been_setup") as string}

-
-
- )} + {isEventListEmpty && }
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index ebfcb46371..7b11851a85 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -1326,5 +1326,7 @@ "saml_sp_acs_url_copied": "ACS URL copied!", "saml_sp_entity_id_copied": "SP Entity ID copied!", "saml_btn_configure": "Configure", - "add_calendar": "Add Calendar" + "add_calendar": "Add Calendar", + "no_event_types": "No event types setup", + "no_event_types_description": "{{name}} has not setup any event types for you to book." } diff --git a/packages/features/eventtypes/components/EmptyPage.tsx b/packages/features/eventtypes/components/EmptyPage.tsx new file mode 100644 index 0000000000..be7e1874a7 --- /dev/null +++ b/packages/features/eventtypes/components/EmptyPage.tsx @@ -0,0 +1,44 @@ +import { useLocale } from "@calcom/lib/hooks/useLocale"; + +const SkeletonEventType = () => { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ); +}; + +function EmptyPage({ name }: { name: string }) { + const { t } = useLocale(); + return ( +
+
+ + + +
+
+

{t("no_event_types")}

+

+ {t("no_event_types_description", { name })} +

+
+
+ ); +} + +export default EmptyPage;