File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 88 SignedIn ,
99 SignedOut ,
1010} from "@clerk/nextjs" ;
11- import { ClerkLogo } from "./components/clerk-logo" ;
11+ import { ClerkLogo } from ".. /components/clerk-logo" ;
1212
13- export default function Home ( ) {
13+ export default function Page ( ) {
1414 return (
1515 < main className = "flex flex-col justify-center items-center min-h-full p-8 pb-20 gap-4 sm:p-20 font-[family-name:var(--font-geist-sans)]" >
1616 < div className = "inline-flex" >
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import Link from "next/link";
55import { CodeSwitcher } from "../components/code-switcher" ;
66import { UserDetails } from "../components/user-details" ;
77
8- export default async function DashboardPage ( ) {
8+ export default async function Page ( ) {
99 await auth . protect ( ) ;
1010
1111 return (
Original file line number Diff line number Diff line change 1- import { clerkMiddleware } from "@clerk/nextjs/server" ;
1+ import { clerkMiddleware , createRouteMatcher } from "@clerk/nextjs/server" ;
22
3- export default clerkMiddleware ( ) ;
3+ const isPublicRoute = createRouteMatcher ( [
4+ "/(.*)" ,
5+ "/sign-in(.*)" ,
6+ "/sign-up(.*)" ,
7+ ] ) ;
8+
9+ export default clerkMiddleware ( async ( auth , req ) => {
10+ if ( ! isPublicRoute ( req ) ) {
11+ await auth . protect ( ) ;
12+ }
13+ } ) ;
414
515export const config = {
616 matcher : [
You can’t perform that action at this time.
0 commit comments