refactor: remove dead insights references (#29029)

This commit is contained in:
Romit authored and GitHub committed 2026-05-01 08:22:35 +05:30
1 parent 9cd1f34f16
commit d278d6c9bc
6 files changed
+3 -45

No files matched your search

-28
View File
@@ -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">
-5
View File
@@ -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}}",
},
@@ -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" });
});
});
+2 -2
View File
@@ -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;