-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c71b16a
commit ca8f05e
Showing
6 changed files
with
270 additions
and
8 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,2 +1,7 @@ | ||
# Clerk | ||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= | ||
CLERK_SECRET_KEY= | ||
|
||
# Upstash | ||
UPSTASH_REDIS_REST_URL= | ||
UPSTASH_REDIS_REST_TOKEN= |
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,15 +1,29 @@ | ||
import type { Metadata } from "next"; | ||
import { GeistSans } from "geist/font/sans"; | ||
import "@/globals.css"; | ||
import { ClerkProvider, SignedIn, SignOutButton } from "@clerk/nextjs"; | ||
|
||
export const metadata: Metadata = { | ||
title: "mmmines", | ||
}; | ||
|
||
export default function RootLayout(props: Readonly<React.PropsWithChildren>) { | ||
return ( | ||
<html lang="en"> | ||
<body className={GeistSans.className}>{props.children}</body> | ||
</html> | ||
<ClerkProvider> | ||
<html lang="en"> | ||
<body className={GeistSans.className}> | ||
<div className="p-10"> | ||
<h1 className="text-4xl">mmmines</h1> | ||
<SignedIn> | ||
<SignOutButton /> | ||
</SignedIn> | ||
<div className="pb-10" /> | ||
<div className="flex flex-col items-center justify-center"> | ||
{props.children} | ||
</div> | ||
</div> | ||
</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 |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import { Field } from "@/components/field"; | ||
|
||
export default function App() { | ||
return ( | ||
<div className="flex h-screen items-center justify-center"> | ||
<Field /> | ||
</div> | ||
); | ||
return <Field />; | ||
} |
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,11 @@ | ||
import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server"; | ||
|
||
const isProtectedRoute = createRouteMatcher(["/(.*)"]); | ||
|
||
export default clerkMiddleware((auth, req) => { | ||
if (isProtectedRoute(req)) auth().protect(); | ||
}); | ||
|
||
export const config = { | ||
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api)(.*)"], | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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