authentication and layout updates.
This commit is contained in:
parent
fa4a4a565c
commit
239ff1b33b
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@ yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
.env
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
5
app/(auth)/(routes)/sign-in/[[...sign-in]]/page.tsx
Normal file
5
app/(auth)/(routes)/sign-in/[[...sign-in]]/page.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import { SignIn } from "@clerk/nextjs";
|
||||
|
||||
export default function Page() {
|
||||
return <SignIn />;
|
||||
}
|
5
app/(auth)/(routes)/sign-up/[[...sign-up]]/page.tsx
Normal file
5
app/(auth)/(routes)/sign-up/[[...sign-up]]/page.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import { SignUp } from "@clerk/nextjs";
|
||||
|
||||
export default function Page() {
|
||||
return <SignUp />;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
const AuthLayout = ( { children }: {children: React.ReactNode}) => {
|
||||
return (
|
||||
<div className="bg-red-500 h-full">
|
||||
<div className="h-full flex items-center justify-center">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
11
app/(main)/(routes)/page.tsx
Normal file
11
app/(main)/(routes)/page.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import { UserButton } from "@clerk/nextjs/app-beta";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div>
|
||||
<UserButton
|
||||
afterSignOutUrl="/"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
import './globals.css'
|
||||
import type { Metadata } from 'next'
|
||||
import { Open_Sans } from 'next/font/google'
|
||||
import { ClerkProvider } from '@clerk/nextjs'
|
||||
|
||||
const Font = Open_Sans({ subsets: ['latin'] })
|
||||
|
||||
@ -15,8 +16,10 @@ export default function RootLayout({
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<ClerkProvider>
|
||||
<html lang="en">
|
||||
<body className={Font.className}>{children}</body>
|
||||
</html>
|
||||
</ClerkProvider>
|
||||
)
|
||||
}
|
||||
|
10
middleware.ts
Normal file
10
middleware.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { authMiddleware } from "@clerk/nextjs";
|
||||
|
||||
// This example protects all routes including api/trpc routes
|
||||
// Please edit this to allow other routes to be public as needed.
|
||||
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your middleware
|
||||
export default authMiddleware({});
|
||||
|
||||
export const config = {
|
||||
matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'],
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user