Skip to content

Commit d278d6c

Browse files
authored
refactor: remove dead insights references (calcom#29029)
1 parent 9cd1f34 commit d278d6c

6 files changed

Lines changed: 3 additions & 45 deletions

File tree

apps/web/app/notFoundClient.tsx

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export function NotFound({ host }: { host: string }) {
2727
const { username, pageType, url } = getPageInfo(pathname);
2828
const isBookingSuccessPage = pathname?.startsWith("/booking");
2929
const isSubpage = pathname?.includes("/", 2) || isBookingSuccessPage;
30-
const isInsights = pathname?.startsWith("/insights");
3130

3231
useLayoutEffect(() => {
3332
if (typeof window !== "undefined") {
@@ -50,33 +49,6 @@ export function NotFound({ host }: { host: string }) {
5049
},
5150
];
5251

53-
/**
54-
* If we're on 404 and the route is insights it means it is disabled
55-
* TODO: Abstract this for all disabled features
56-
**/
57-
if (isInsights) {
58-
return (
59-
<div className="min-h-screen bg-white px-4" data-testid="404-page">
60-
<main className="mx-auto max-w-xl pt-16 pb-6 sm:pt-24">
61-
<div className="text-center">
62-
<p className="font-semibold text-black text-sm uppercase tracking-wide">{t("error_404")}</p>
63-
<h1 className="mt-2 font-cal font-extrabold text-4xl text-gray-900 sm:text-5xl">
64-
{t("feature_currently_disabled") ?? "Feature is currently disabled"}
65-
</h1>
66-
</div>
67-
<div className="mt-12">
68-
<div className="mt-8">
69-
<Link href={WEBSITE_URL} className="font-medium text-base text-black hover:text-gray-500">
70-
{t("or_go_back_home")}
71-
<span aria-hidden="true"> &rarr;</span>
72-
</Link>
73-
</div>
74-
</div>
75-
</main>
76-
</div>
77-
);
78-
}
79-
8052
return (
8153
<div className="min-h-screen bg-default px-4" data-testid="404-page">
8254
<main className="mx-auto max-w-xl pt-16 pb-6 sm:pt-24">

apps/web/next.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ const nextConfig = (phase: string): NextConfig => {
249249
"@coss/ui",
250250
],
251251
modularizeImports: {
252-
"@calcom/web/modules/insights/components": {
253-
transform: "@calcom/web/modules/insights/components/{{member}}",
254-
skipDefaultConversion: true,
255-
preventFullImport: true,
256-
},
257252
lodash: {
258253
transform: "lodash/{{member}}",
259254
},

apps/web/playwright/app-router-not-found.e2e.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ test.describe("App Router - error handling", () => {
1010
page,
1111
}) => {
1212
await expectPageToBeNotFound({ page, url: "/123491234" });
13-
await expectPageToBeNotFound({ page, url: "/insights/123491234" });
1413
await expectPageToBeNotFound({ page, url: "/login/123491234" });
1514
});
1615
});

apps/web/playwright/booking-pages.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,11 @@ test.describe("GTM container", () => {
650650
const [user] = users.get();
651651
await user.apiLogin();
652652

653-
// Go to /insights page and wait for one of the common API call to complete
653+
// Go to a non-booking page and wait for one of the common API calls to complete.
654654
const eventsByStatusRespPromise = page.waitForResponse(
655655
(response) => response.url().includes("getEventTypesFromGroup") && response.status() === 200
656656
);
657-
await page.goto(`/insights`);
657+
await page.goto("/event-types");
658658
await page.waitForLoadState("domcontentloaded");
659659
await eventsByStatusRespPromise;
660660

packages/emails/src/templates/MonthlyDigestEmail.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { TFunction } from "i18next";
22

33
import { APP_NAME, SENDER_NAME, SUPPORT_MAIL_ADDRESS } from "@calcom/lib/constants";
44

5-
import { BaseEmailHtml, CallToAction } from "../components";
5+
import { BaseEmailHtml } from "../components";
66

77
export type MonthlyDigestEmailData = {
88
language: TFunction;
@@ -177,13 +177,6 @@ export const MonthlyDigestEmail = (
177177
))
178178
: null}
179179
</div>
180-
<div style={{ marginTop: "30px", marginBottom: "30px" }}>
181-
<CallToAction
182-
label="View all stats"
183-
href={`${process.env.NEXT_PUBLIC_WEBSITE_URL}/insights?teamId=${props.team.id}`}
184-
endIconName="white-arrow-right"
185-
/>
186-
</div>
187180
</div>
188181
<div style={{ lineHeight: "6px" }}>
189182
<p style={{ fontWeight: 400, lineHeight: "24px" }}>

packages/prisma/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"seed-app-store": "ts-node --transpile-only ../../scripts/seed-app-store.ts",
2323
"delete-app": "ts-node --transpile-only ./delete-app.ts",
2424
"seed-basic": "ts-node --transpile-only ../../scripts/seed.ts",
25-
"seed-insights": "ts-node --transpile-only ../../scripts/seed-insights.ts",
2625
"seed-pbac": "ts-node --transpile-only ../../scripts/seed-pbac-organization.ts"
2726
},
2827
"dependencies": {

0 commit comments

Comments
 (0)