-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from abhishekHegde2000/test-branch
created clerk authentication.
- Loading branch information
Showing
5 changed files
with
64 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import type { Metadata } from 'next' | ||
import { Inter } from 'next/font/google' | ||
import './globals.css' | ||
import type { Metadata } from "next"; | ||
import { Inter } from "next/font/google"; | ||
import "./globals.css"; | ||
import { ClerkProvider } from "@clerk/nextjs"; | ||
|
||
const inter = Inter({ subsets: ['latin'] }) | ||
const inter = Inter({ subsets: ["latin"] }); | ||
|
||
export const metadata: Metadata = { | ||
title: 'Create Next App', | ||
description: 'Generated by create next app', | ||
} | ||
title: "Ai-Note-Taking-App", | ||
description: "Intelligent note taking app", | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body className={inter.className}>{children}</body> | ||
</html> | ||
) | ||
<ClerkProvider> | ||
<html lang="en"> | ||
<body className={inter.className}>{children}</body> | ||
</html> | ||
</ClerkProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Ai - Notes", | ||
}; | ||
|
||
export default function NotesPage() { | ||
return <div>Here will be your notes</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { SignIn } from "@clerk/nextjs"; | ||
import { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "AI-noteTaker - Sign In", | ||
}; | ||
|
||
export default function SignInPage() { | ||
return ( | ||
<div className="flex h-screen items-center justify-center"> | ||
<SignIn appearance={{ variables: { colorPrimary: "#0F172A" } }} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { SignUp } from "@clerk/nextjs"; | ||
import { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "AI-noteTaker - Sign Up", | ||
}; | ||
|
||
export default function SignUpPage() { | ||
return ( | ||
<div className="flex h-screen items-center justify-center"> | ||
<SignUp appearance={{ variables: { colorPrimary: "#0F172A" } }} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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({ | ||
publicRoutes: ["/"], | ||
}); | ||
|
||
export const config = { | ||
matcher: ["/((?!.+\\.[\\w]+$|_next).*)", "/", "/(api|trpc)(.*)"], | ||
}; |