Skip to content

Commit 2a89b60

Browse files
fix
1 parent 48f22dc commit 2a89b60

9 files changed

Lines changed: 305 additions & 7 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { SignIn } from '@clerk/nextjs'
2+
3+
export default function Page() {
4+
return <SignIn />
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { SignUp } from '@clerk/nextjs'
2+
3+
export default function Page() {
4+
return <SignUp />
5+
}

app/layout.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Geist, Geist_Mono } from "next/font/google";
22
import "./globals.css";
33
import { Outfit } from "next/font/google";
44
import Provider from "@/provider";
5+
import { ClerkProvider } from "@clerk/nextjs";
56

67

78
export const metadata = {
@@ -14,12 +15,14 @@ const outfit= Outfit({
1415
})
1516
export default function RootLayout({ children }) {
1617
return (
18+
<ClerkProvider>
1719
<html lang="en">
1820
<body
1921
className={outfit.className}
2022
>
2123
<Provider>{children}</Provider>
2224
</body>
2325
</html>
26+
</ClerkProvider>
2427
);
2528
}

image-1.png

-123 KB
Binary file not shown.

image.png

-90.4 KB
Binary file not shown.

middleware.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
2+
3+
const isProtectedRoute = createRouteMatcher(['/dashboard(.*)'])
4+
5+
export default clerkMiddleware(async (auth, req) => {
6+
if (isProtectedRoute(req)) await auth.protect()
7+
})
8+
9+
export const config = {
10+
matcher: [
11+
// Skip Next.js internals and all static files, unless found in search params
12+
'/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
13+
// Always run for API routes
14+
'/(api|trpc)(.*)',
15+
],
16+
}

next.config.mjs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
reactStrictMode: true,
4-
};
5-
6-
export default nextConfig;
3+
reactStrictMode: true, // Enables React Strict Mode for development
4+
5+
// Remove the 'productionSourceMaps' setting as it is not valid in Next.js 15.x
6+
devIndicators: {
7+
autoPrerender: false, // Disables the automatic prerendering indicator in development
8+
},
9+
};
10+
11+
export default nextConfig;
12+

0 commit comments

Comments
 (0)