File tree Expand file tree Collapse file tree
app/(use-page-wrapper)/routing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type { ReactNode } from "react" ;
2+ import Shell from "~/shell/Shell" ;
3+ import FormProvider from "../apps/routing-forms/[...pages]/FormProvider" ;
4+
5+ export default async function Layout ( { children } : { children : ReactNode } ) {
6+ return (
7+ < Shell withoutMain = { true } >
8+ < FormProvider > { children } </ FormProvider >
9+ </ Shell >
10+ ) ;
11+ }
Original file line number Diff line number Diff line change 1+ import { _generateMetadata } from "app/_utils" ;
2+ import { cookies , headers } from "next/headers" ;
3+ import { redirect } from "next/navigation" ;
4+
5+ import { getServerSession } from "@calcom/features/auth/lib/getServerSession" ;
6+
7+ import { buildLegacyRequest } from "@lib/buildLegacyCtx" ;
8+
9+ import Forms from "../apps/routing-forms/forms/[[...pages]]/Forms" ;
10+
11+ const generateMetadata = async ( ) => {
12+ return await _generateMetadata (
13+ ( t ) => `${ t ( "routing_forms" ) } | Cal.com Forms` ,
14+ ( ) => "" ,
15+ undefined ,
16+ undefined ,
17+ `/routing`
18+ ) ;
19+ } ;
20+
21+ const ServerPage = async ( ) => {
22+ const session = await getServerSession ( { req : buildLegacyRequest ( await headers ( ) , await cookies ( ) ) } ) ;
23+
24+ if ( ! session ?. user ?. id ) {
25+ redirect ( "/auth/login" ) ;
26+ }
27+
28+ return < Forms appUrl = "/routing" /> ;
29+ } ;
30+
31+ export { generateMetadata } ;
32+ export default ServerPage ;
Original file line number Diff line number Diff line change @@ -273,14 +273,6 @@ const nextConfig = (phase: string): NextConfig => {
273273 source : "/forms/:formQuery*" ,
274274 destination : "/apps/routing-forms/routing-link/:formQuery*" ,
275275 } ,
276- {
277- source : "/routing" ,
278- destination : "/routing/forms" ,
279- } ,
280- {
281- source : "/routing/:path*" ,
282- destination : "/apps/routing-forms/:path*" ,
283- } ,
284276 {
285277 source : "/routing-forms" ,
286278 destination : "/apps/routing-forms/forms" ,
@@ -339,6 +331,10 @@ const nextConfig = (phase: string): NextConfig => {
339331 ] . filter ( isNotNull ) ;
340332
341333 const afterFiles = [
334+ {
335+ source : "/routing/:path*" ,
336+ destination : "/apps/routing-forms/:path*" ,
337+ } ,
342338 {
343339 source : "/org/:slug" ,
344340 destination : "/team/:slug" ,
You can’t perform that action at this time.
0 commit comments