diff --git a/src/app/layout.js b/src/app/layout.js index 156536aa..55cb11f3 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -3,6 +3,7 @@ import './globals.css' import Headers from '@/components/Headers' import RecoilRootWrapper from './RecoilWrapper' import UIProvider from './UIProvider' +import { headers } from 'next/headers' const inter = Inter({ subsets: ['latin'] }) @@ -12,10 +13,14 @@ export const metadata = { } export default function RootLayout({ children }) { + const headersList = headers() + const headerPathname = headersList.get('x-pathname') || '' + // console.log('headerPathname', headerPathname) + return ( - + {headerPathname !== '/login' && } {children} diff --git a/src/app/login/page.jsx b/src/app/login/page.jsx new file mode 100644 index 00000000..c5d063fd --- /dev/null +++ b/src/app/login/page.jsx @@ -0,0 +1,91 @@ +export default function page() { + return ( + <> +
+
+
+ Your Company +

+ Sign in to your account +

+
+ +
+
+
+ +
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+ +
+
+ +

+ Not a member?{' '} + + Start a 14 day free trial + +

+
+
+
+ + ) +} diff --git a/src/middleware.js b/src/middleware.js new file mode 100644 index 00000000..d0329940 --- /dev/null +++ b/src/middleware.js @@ -0,0 +1,12 @@ +import { NextRequest, NextResponse } from 'next/server' + +export function middleware(request) { + const requestHeaders = new Headers(request.headers) + requestHeaders.set('x-pathname', request.nextUrl.pathname) + + return NextResponse.next({ + request: { + headers: requestHeaders, + }, + }) +}