chore: app router - /payment pages (#18152)

* remove Head from payment page comp

* remove route from pages router

* move out of future folder

* add to config.matcher

* remove unneeded code

* update middleware

* fix

* fix
This commit is contained in:
Benny Joo authored and GitHub committed 2025-01-25 13:23:41 -05:00
1 parent 0dab3e1a6d
commit 828940b4d6
5 files changed
+25 -35

No files matched your search

@@ -1,17 +0,0 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import PaymentPage from "@calcom/features/ee/payments/components/PaymentPage";
import { getServerSideProps, type PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
export const generateMetadata = async () =>
await _generateMetadata(
// the title does not contain the eventName as in the legacy page
(t) => `${t("payment")}`,
() => ""
);
const getData = withAppDirSsr<PaymentPageProps>(getServerSideProps);
export default WithLayout({ getLayout: null, getData, Page: PaymentPage });
+24
View File
@@ -0,0 +1,24 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
import type { PageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { cookies, headers } from "next/headers";
import PaymentPage from "@calcom/features/ee/payments/components/PaymentPage";
import { getServerSideProps, type PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
import { APP_NAME } from "@calcom/lib/constants";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
const eventName = props.booking.title;
return await _generateMetadata(
(t) => `${t("payment")} | ${eventName} | ${APP_NAME}`,
() => ""
);
};
const getData = withAppDirSsr<PaymentPageProps>(getServerSideProps);
export default WithLayout({ getLayout: null, getData, Page: PaymentPage });