refactor: remove dead insights references (#29029)
This commit is contained in:
@@ -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"> →</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">
|
||||
|
||||
@@ -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" });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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" }}>
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user