Skip to content

Scheduling infrastructure for absolutely everyone.

Fix #4457 (remove event type action buttons) (#4472)

Alex van Andel2281c7cf9f64
diff --git a/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx b/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx
index 5fc7b0ee3b6..b0606275513 100644
--- a/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx
+++ b/apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx
@@ -154,6 +154,7 @@ function EventTypeSingleLayout({
return (
<Shell
+ backPath="/event-types"
title={t("event_type_title", { eventTypeTitle: eventType.title })}
heading={eventType.title}
subtitle={eventType.description || ""}
diff --git a/apps/web/pages/v2/event-types/[type]/index.tsx b/apps/web/pages/v2/event-types/[type]/index.tsx
index c14899fe910..e8f1050c049 100644
--- a/apps/web/pages/v2/event-types/[type]/index.tsx
+++ b/apps/web/pages/v2/event-types/[type]/index.tsx
@@ -17,7 +17,7 @@ import prisma from "@calcom/prisma";
import { trpc } from "@calcom/trpc/react";
import type { RecurringEvent } from "@calcom/types/Calendar";
import { Form } from "@calcom/ui/form/fields";
-import { Button, showToast } from "@calcom/ui/v2";
+import { showToast } from "@calcom/ui/v2";
import { asStringOrThrow } from "@lib/asStringOrNull";
import { getSession } from "@lib/auth";
@@ -37,8 +37,6 @@ import EventWorkflowsTab from "@components/v2/eventtype/EventWorkfowsTab";
import { getTranslation } from "@server/lib/i18n";
-const TABS_WITHOUT_ACTION_BUTTONS = ["workflows", "availability"];
-
export type FormValues = {
title: string;
eventTitle: string;
@@ -245,16 +243,6 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
<div ref={animationParentRef} className="space-y-6">
{tabMap[tabName]}
</div>
- {!TABS_WITHOUT_ACTION_BUTTONS.includes(tabName) && (
- <div className="mt-4 flex justify-end space-x-2 rtl:space-x-reverse">
- <Button href="/event-types" color="secondary" tabIndex={-1}>
- {t("cancel")}
- </Button>
- <Button type="submit" data-testid="update-eventtype" disabled={updateMutation.isLoading}>
- {t("update")}
- </Button>
- </div>
- )}
</Form>
</EventTypeSingleLayout>
);