Skip to content

Commit 2922c8f

Browse files
authored
perf: Move runtime redirects to build-time redirects in next.config.js (calcom#23325)
* routing forms * auth new * settings route * apps installed * next.config.js
1 parent 4599740 commit 2922c8f

6 files changed

Lines changed: 15 additions & 44 deletions

File tree

apps/web/app/(use-page-wrapper)/apps/installed/page.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/web/app/(use-page-wrapper)/apps/routing-forms/page.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/apps/page.tsx

Lines changed: 0 additions & 17 deletions
This file was deleted.

apps/web/app/auth/new/page.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/web/app/routing-forms/page.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/web/next.config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ const nextConfig = (phase) => {
295295
source: "/routing/:path*",
296296
destination: "/apps/routing-forms/:path*",
297297
},
298+
{
299+
source: "/routing-forms",
300+
destination: "/apps/routing-forms/forms",
301+
},
298302
{
299303
source: "/success/:path*",
300304
has: [
@@ -548,14 +552,19 @@ const nextConfig = (phase) => {
548552
},
549553
{
550554
source: "/apps/routing-forms",
551-
destination: "/routing/forms",
555+
destination: "/apps/routing-forms/forms",
552556
permanent: false,
553557
},
554558
{
555559
source: "/api/app-store/:path*",
556560
destination: "/app-store/:path*",
557561
permanent: true,
558562
},
563+
{
564+
source: "/auth/new",
565+
destination: process.env.NEXT_PUBLIC_WEBAPP_URL || "https://app.cal.com",
566+
permanent: true,
567+
},
559568
{
560569
source: "/auth/signup",
561570
destination: "/signup",
@@ -653,6 +662,11 @@ const nextConfig = (phase) => {
653662
destination: "/settings/platform",
654663
permanent: true,
655664
},
665+
{
666+
source: "/settings/admin/apps",
667+
destination: "/settings/admin/apps/calendar",
668+
permanent: true,
669+
},
656670
// OAuth callbacks when sent to localhost:3000(w would be expected) should be redirected to corresponding to WEBAPP_URL
657671
...(process.env.NODE_ENV === "development" &&
658672
// Safer to enable the redirect only when the user is opting to test out organizations

0 commit comments

Comments
 (0)