Skip to content

Scheduling infrastructure for absolutely everyone.

refactor: remove dead insights references (#29029)

Romitd278d6c9bc53
diff --git a/apps/web/app/notFoundClient.tsx b/apps/web/app/notFoundClient.tsx
index 2b9b2702c38..1229f541705 100644
--- a/apps/web/app/notFoundClient.tsx
+++ b/apps/web/app/notFoundClient.tsx
@@ -27,7 +27,6 @@ export function NotFound({ host }: { host: string }) {
const { username, pageType, url } = getPageInfo(pathname);
const isBookingSuccessPage = pathname?.startsWith("/booking");
const isSubpage = pathname?.includes("/", 2) || isBookingSuccessPage;
- const isInsights = pathname?.startsWith("/insights");
useLayoutEffect(() => {
if (typeof window !== "undefined") {
@@ -50,33 +49,6 @@ export function NotFound({ host }: { host: string }) {
},
];
- /**
- * If we're on 404 and the route is insights it means it is disabled
- * TODO: Abstract this for all disabled features
- **/
- if (isInsights) {
- return (
- <div className="min-h-screen bg-white px-4" data-testid="404-page">
- <main className="mx-auto max-w-xl pt-16 pb-6 sm:pt-24">
- <div className="text-center">
- <p className="font-semibold text-black text-sm uppercase tracking-wide">{t("error_404")}</p>
- <h1 className="mt-2 font-cal font-extrabold text-4xl text-gray-900 sm:text-5xl">
- {t("feature_currently_disabled") ?? "Feature is currently disabled"}
- </h1>
- </div>
- <div className="mt-12">
- <div className="mt-8">
- <Link href={WEBSITE_URL} className="font-medium text-base text-black hover:text-gray-500">
- {t("or_go_back_home")}
- <span aria-hidden="true"> &rarr;</span>
- </Link>
- </div>
- </div>
- </main>
- </div>
- );
- }
-
return (
<div className="min-h-screen bg-default px-4" data-testid="404-page">
<main className="mx-auto max-w-xl pt-16 pb-6 sm:pt-24">
diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts
index 124b88b6c02..133974fe4cb 100644
--- a/apps/web/next.config.ts
+++ b/apps/web/next.config.ts
@@ -249,11 +249,6 @@ const nextConfig = (phase: string): NextConfig => {
"@coss/ui",
],
modularizeImports: {
- "@calcom/web/modules/insights/components": {
- transform: "@calcom/web/modules/insights/components/{{member}}",
- skipDefaultConversion: true,
- preventFullImport: true,
- },
lodash: {
transform: "lodash/{{member}}",
},
diff --git a/apps/web/playwright/app-router-not-found.e2e.ts b/apps/web/playwright/app-router-not-found.e2e.ts
index 0857e44cf79..5c5af5f987d 100644
--- a/apps/web/playwright/app-router-not-found.e2e.ts
+++ b/apps/web/playwright/app-router-not-found.e2e.ts
@@ -10,7 +10,6 @@ test.describe("App Router - error handling", () => {
page,
}) => {
await expectPageToBeNotFound({ page, url: "/123491234" });
- await expectPageToBeNotFound({ page, url: "/insights/123491234" });
await expectPageToBeNotFound({ page, url: "/login/123491234" });
});
});
diff --git a/apps/web/playwright/booking-pages.e2e.ts b/apps/web/playwright/booking-pages.e2e.ts
index 8e4efde9c2b..407af205fc6 100644
--- a/apps/web/playwright/booking-pages.e2e.ts
+++ b/apps/web/playwright/booking-pages.e2e.ts
@@ -650,11 +650,11 @@ test.describe("GTM container", () => {
const [user] = users.get();
await user.apiLogin();
- // Go to /insights page and wait for one of the common API call to complete
+ // Go to a non-booking page and wait for one of the common API calls to complete.
const eventsByStatusRespPromise = page.waitForResponse(
(response) => response.url().includes("getEventTypesFromGroup") && response.status() === 200
);
- await page.goto(`/insights`);
+ await page.goto("/event-types");
await page.waitForLoadState("domcontentloaded");
await eventsByStatusRespPromise;
diff --git a/packages/emails/src/templates/MonthlyDigestEmail.tsx b/packages/emails/src/templates/MonthlyDigestEmail.tsx
index 78978a9e814..9420142d583 100644
--- a/packages/emails/src/templates/MonthlyDigestEmail.tsx
+++ b/packages/emails/src/templates/MonthlyDigestEmail.tsx
@@ -2,7 +2,7 @@ import type { TFunction } from "i18next";
import { APP_NAME, SENDER_NAME, SUPPORT_MAIL_ADDRESS } from "@calcom/lib/constants";
-import { BaseEmailHtml, CallToAction } from "../components";
+import { BaseEmailHtml } from "../components";
export type MonthlyDigestEmailData = {
language: TFunction;
@@ -177,13 +177,6 @@ export const MonthlyDigestEmail = (
))
: null}
</div>
- <div style={{ marginTop: "30px", marginBottom: "30px" }}>
- <CallToAction
- label="View all stats"
- href={`${process.env.NEXT_PUBLIC_WEBSITE_URL}/insights?teamId=${props.team.id}`}
- endIconName="white-arrow-right"
- />
- </div>
</div>
<div style={{ lineHeight: "6px" }}>
<p style={{ fontWeight: 400, lineHeight: "24px" }}>
diff --git a/packages/prisma/package.json b/packages/prisma/package.json
index 7a612efef70..2876b4e3c44 100644
--- a/packages/prisma/package.json
+++ b/packages/prisma/package.json
@@ -22,7 +22,6 @@
"seed-app-store": "ts-node --transpile-only ../../scripts/seed-app-store.ts",
"delete-app": "ts-node --transpile-only ./delete-app.ts",
"seed-basic": "ts-node --transpile-only ../../scripts/seed.ts",
- "seed-insights": "ts-node --transpile-only ../../scripts/seed-insights.ts",
"seed-pbac": "ts-node --transpile-only ../../scripts/seed-pbac-organization.ts"
},
"dependencies": {