File tree 5 files changed +38
-2
lines changed
5 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 2
2
@tailwind components;
3
3
@tailwind utilities;
4
4
5
+ @layer utilities{
6
+ .flex-center {
7
+ @apply flex justify-center items-center;
8
+ }
9
+
10
+ .flex-between {
11
+ @apply flex justify-between items-center;
12
+ }
13
+ }
14
+
5
15
: root {
6
16
--background : # ffffff ;
7
17
--foreground : # 171717 ;
Original file line number Diff line number Diff line change 1
1
import type { Metadata } from "next" ;
2
2
import "./globals.css" ;
3
3
import { Inter } from "next/font/google" ;
4
+ import { ClerkProvider } from "@clerk/nextjs" ;
4
5
5
6
const inter = Inter ( { subsets : [ "latin" ] } ) ;
6
7
@@ -17,9 +18,11 @@ export default function RootLayout({
17
18
} > ) {
18
19
return (
19
20
< html lang = "en" >
21
+ < ClerkProvider >
20
22
< body className = { `${ inter . className } bg-dark-2` } >
21
23
{ children }
22
24
</ body >
25
+ </ ClerkProvider >
23
26
</ html >
24
27
) ;
25
28
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const Navbar = () => {
21
21
</ Link >
22
22
< div className = "flex-between gap-5" >
23
23
< SignedIn >
24
- < UserButton afterSignOutUrl = "/sign-in" />
24
+ < UserButton />
25
25
</ SignedIn >
26
26
27
27
< MobileNav />
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const Sidebar = () => {
12
12
< section className = "sticky left-0 top-0 flex h-screen w-fit flex-col justify-between bg-dark-1 p-6 pt-28 text-white max-sm:hidden lg:w-[264px]" >
13
13
< div className = "flex flex-1 flex-col gap-6" >
14
14
{ sidebarLinks . map ( ( link ) => {
15
- const isActive = pathname === link . route || pathname . startsWith ( link . route ) ;
15
+ const isActive = pathname === link . route || pathname . startsWith ( `$( link.route)/` ) ;
16
16
17
17
return (
18
18
< Link
Original file line number Diff line number Diff line change
1
+ import { clerkMiddleware , createRouteMatcher } from '@clerk/nextjs/server'
2
+
3
+ const protectedRoutes = createRouteMatcher ( [
4
+ '/' ,
5
+ '/upcoming' ,
6
+ '/previous' ,
7
+ '/recordings' ,
8
+ '/personal-room' ,
9
+ '/meeting(.*)'
10
+ ] )
11
+
12
+ export default clerkMiddleware ( ( auth , req ) => {
13
+ if ( protectedRoutes ( req ) ) auth ( ) . protect ( ) ;
14
+ } )
15
+
16
+ export const config = {
17
+ matcher : [
18
+ // Skip Next.js internals and all static files, unless found in search params
19
+ '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)' ,
20
+ // Always run for API routes
21
+ '/(api|trpc)(.*)' ,
22
+ ] ,
23
+ }
You can’t perform that action at this time.
0 commit comments