chore: [app-router-migration-1] migrate the pages in settings/admin to the app directory (#12561)

Co-authored-by: Dmytro Hryshyn <[email protected]>
Co-authored-by: DmytroHryshyn <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-12-01 13:07:26 -07:00
1 parent d13dedda9a
commit ca78be011c
83 files changed
+1193 -165

No files matched your search

+1 -1
View File
@@ -5,6 +5,7 @@ import z from "zod";
const ROUTES: [URLPattern, boolean][] = [
["/event-types", process.env.APP_ROUTER_EVENT_TYPES_ENABLED === "1"] as const,
["/settings/admin/:path*", process.env.APP_ROUTER_SETTINGS_ADMIN_ENABLED === "1"] as const,
].map(([pathname, enabled]) => [
new URLPattern({
pathname,
@@ -27,7 +28,6 @@ export const abTestMiddlewareFactory =
const override = req.cookies.has(FUTURE_ROUTES_OVERRIDE_COOKIE_NAME);
const route = ROUTES.find(([regExp]) => regExp.test(req.url)) ?? null;
const enabled = route !== null ? route[1] || override : false;
if (pathname.includes("future") || !enabled) {