Skip to content

Scheduling infrastructure for absolutely everyone.

chore: app router - /booking pages (#18182)

Benny Joo460e5114597b
diff --git a/.env.example b/.env.example
index 3a20de51d2d..bd6f62cde68 100644
--- a/.env.example
+++ b/.env.example
@@ -361,7 +361,6 @@ APP_ROUTER_APPS_SLUG_SETUP_ENABLED=0
APP_ROUTER_APPS_CATEGORIES_ENABLED=0
# whether we redirect to the future/apps/categories/[category] from /apps/categories/[category] or not
APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED=0
-APP_ROUTER_BOOKING_ENABLED=0
APP_ROUTER_BOOKINGS_STATUS_ENABLED=0
APP_ROUTER_APPS_ENABLED=0
APP_ROUTER_TEAM_ENABLED=0
diff --git a/apps/web/abTest/middlewareFactory.ts b/apps/web/abTest/middlewareFactory.ts
index 33fc3776c95..098e8979720 100644
--- a/apps/web/abTest/middlewareFactory.ts
+++ b/apps/web/abTest/middlewareFactory.ts
@@ -21,7 +21,6 @@ const ROUTES: [URLPattern, boolean][] = [
["/auth/platform/:path*", process.env.APP_ROUTER_AUTH_PLATFORM_ENABLED === "1"] as const,
["/auth/oauth2/:path*", process.env.APP_ROUTER_AUTH_OAUTH2_ENABLED === "1"] as const,
["/bookings/:status", process.env.APP_ROUTER_BOOKINGS_STATUS_ENABLED === "1"] as const,
- ["/booking/:path*", process.env.APP_ROUTER_BOOKING_ENABLED === "1"] as const,
["/team", process.env.APP_ROUTER_TEAM_ENABLED === "1"] as const,
].map(([pathname, enabled]) => [
new URLPattern({
diff --git a/apps/web/app/future/booking/[uid]/embed/page.tsx b/apps/web/app/booking/[uid]/embed/page.tsx
similarity index 100%
rename from apps/web/app/future/booking/[uid]/embed/page.tsx
rename to apps/web/app/booking/[uid]/embed/page.tsx
diff --git a/apps/web/app/future/booking/[uid]/page.tsx b/apps/web/app/booking/[uid]/page.tsx
similarity index 100%
rename from apps/web/app/future/booking/[uid]/page.tsx
rename to apps/web/app/booking/[uid]/page.tsx
diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts
index cd3ddc3adc8..3b007c37743 100644
--- a/apps/web/middleware.ts
+++ b/apps/web/middleware.ts
@@ -194,6 +194,7 @@ export const config = {
"/settings/:path*",
"/reschedule/:path*",
"/availability/:path*",
+ "/booking/:path*",
],
};
diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx
index 22b5b654293..e541afd7618 100644
--- a/apps/web/modules/bookings/views/bookings-single-view.tsx
+++ b/apps/web/modules/bookings/views/bookings-single-view.tsx
@@ -63,7 +63,6 @@ import {
EmptyScreen,
Icon,
} from "@calcom/ui";
-import PageWrapper from "@calcom/web/components/PageWrapper";
import CancelBooking from "@calcom/web/components/booking/CancelBooking";
import EventReservationSchema from "@calcom/web/components/schemas/EventReservationSchema";
import { timeZone } from "@calcom/web/lib/clock";
@@ -1116,7 +1115,6 @@ const DisplayLocation = ({
);
Success.isBookingPage = true;
-Success.PageWrapper = PageWrapper;
type RecurringBookingsProps = {
eventType: PageProps["eventType"];
diff --git a/apps/web/pages/booking/[uid]/embed.tsx b/apps/web/pages/booking/[uid]/embed.tsx
deleted file mode 100644
index 7c4dbc8f942..00000000000
--- a/apps/web/pages/booking/[uid]/embed.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import withEmbedSsr from "@lib/withEmbedSsr";
-
-import { getServerSideProps as _getServerSideProps } from "~/bookings/views/bookings-single-view.getServerSideProps";
-
-export { default } from "~/bookings/views/bookings-single-view";
-
-export const getServerSideProps = withEmbedSsr(_getServerSideProps);
diff --git a/apps/web/pages/booking/[uid]/index.tsx b/apps/web/pages/booking/[uid]/index.tsx
deleted file mode 100644
index 3446d77b842..00000000000
--- a/apps/web/pages/booking/[uid]/index.tsx
+++ /dev/null
@@ -1,2 +0,0 @@
-export { default } from "~/bookings/views/bookings-single-view";
-export { getServerSideProps } from "~/bookings/views/bookings-single-view.getServerSideProps";
diff --git a/apps/web/scripts/vercel-app-router-deploy.sh b/apps/web/scripts/vercel-app-router-deploy.sh
index 5ec76216837..ebc498658d9 100755
--- a/apps/web/scripts/vercel-app-router-deploy.sh
+++ b/apps/web/scripts/vercel-app-router-deploy.sh
@@ -21,13 +21,11 @@ checkRoute "$APP_ROUTER_AUTH_ERROR_ENABLED" app/future/auth/error
checkRoute "$APP_ROUTER_AUTH_PLATFORM_ENABLED" app/future/auth/platform
checkRoute "$APP_ROUTER_AUTH_OAUTH2_ENABLED" app/future/auth/oauth2
checkRoute "$APP_ROUTER_BOOKINGS_STATUS_ENABLED" app/future/bookings
-checkRoute "$APP_ROUTER_BOOKING_ENABLED" app/future/booking
checkRoute "$APP_ROUTER_TEAM_ENABLED" app/future/team
# These are routes that don't have and environment variable to enable or disable them
# Will stop removing gradually as we test and confirm that they are working
rm -rf \
- app/future/booking\
app/future/d\
app/future/enterprise\
app/future/org\
diff --git a/turbo.json b/turbo.json
index 04fc464950a..a8698188b28 100644
--- a/turbo.json
+++ b/turbo.json
@@ -240,7 +240,6 @@
"APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED",
"APP_ROUTER_APPS_SLUG_ENABLED",
"APP_ROUTER_APPS_SLUG_SETUP_ENABLED",
- "APP_ROUTER_BOOKING_ENABLED",
"APP_ROUTER_BOOKINGS_STATUS_ENABLED",
"APP_ROUTER_EVENT_TYPES_ENABLED",
"APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED",