diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-05-12 22:08:30 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-05-12 22:08:30 +0100 |
| commit | 0f0b8ed3191210707965cc78ae626023c3b922f0 (patch) | |
| tree | 4bea7a6cb53ba174876a4e4e1096a0c7f8122e2f /communities/red-right-hand/174bg.net/src | |
| parent | c1ca45a0ba712de6fe222d4599fe12792c2271e0 (diff) | |
| download | unnamed-group-0f0b8ed3191210707965cc78ae626023c3b922f0.tar unnamed-group-0f0b8ed3191210707965cc78ae626023c3b922f0.tar.gz unnamed-group-0f0b8ed3191210707965cc78ae626023c3b922f0.tar.bz2 unnamed-group-0f0b8ed3191210707965cc78ae626023c3b922f0.tar.xz unnamed-group-0f0b8ed3191210707965cc78ae626023c3b922f0.zip | |
add clerk auth
Diffstat (limited to 'communities/red-right-hand/174bg.net/src')
3 files changed, 37 insertions, 3 deletions
diff --git a/communities/red-right-hand/174bg.net/src/app/layout.js b/communities/red-right-hand/174bg.net/src/app/layout.js index ce97609..32d23f4 100644 --- a/communities/red-right-hand/174bg.net/src/app/layout.js +++ b/communities/red-right-hand/174bg.net/src/app/layout.js @@ -1,3 +1,10 @@ +import { + ClerkProvider, + Show, + SignInButton, + SignUpButton, + UserButton, +} from "@clerk/nextjs"; import { Inter, Fira_Code } from "next/font/google"; import "./globals.css"; import TerminalOverlay from "@/components/TerminalOverlay"; @@ -27,8 +34,23 @@ export default function RootLayout({ children }) { className={`${inter.variable} ${firaCode.variable} h-full antialiased`} > <body className="min-h-full flex flex-col"> - <TerminalOverlay /> - {children} + <ClerkProvider> + <header className="flex justify-end items-center p-4 gap-4 h-16"> + <Show when="signed-out"> + <SignInButton /> + <SignUpButton> + <button className="bg-purple-700 text-white rounded-full font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 cursor-pointer"> + Sign Up + </button> + </SignUpButton> + </Show> + <Show when="signed-in"> + <UserButton /> + </Show> + </header> + <TerminalOverlay /> + {children} + </ClerkProvider> </body> </html> ); diff --git a/communities/red-right-hand/174bg.net/src/components/TerminalOverlay/index.js b/communities/red-right-hand/174bg.net/src/components/TerminalOverlay/index.js index 6053949..2d7c5da 100644 --- a/communities/red-right-hand/174bg.net/src/components/TerminalOverlay/index.js +++ b/communities/red-right-hand/174bg.net/src/components/TerminalOverlay/index.js @@ -10,7 +10,7 @@ export default function TerminalOverlay() { <> <button onClick={() => setOpen(true)} - className="fixed top-4 right-4 bg-gray-800 text-white p-3 rounded-full shadow-lg hover:bg-gray-700 transition-colors z-50" + className="fixed bottom-4 right-4 bg-gray-800 text-white p-3 rounded-full shadow-lg hover:bg-gray-700 transition-colors z-50" title="Access the web terminal" > <CommandLineIcon className="h-5 w-5" /> diff --git a/communities/red-right-hand/174bg.net/src/proxy.js b/communities/red-right-hand/174bg.net/src/proxy.js new file mode 100644 index 0000000..21b699f --- /dev/null +++ b/communities/red-right-hand/174bg.net/src/proxy.js @@ -0,0 +1,12 @@ +import { clerkMiddleware } from "@clerk/nextjs/server"; + +export default clerkMiddleware(); + +export const config = { + matcher: [ + // Skip Next.js internals and all static files, unless found in search params + "/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)", + // Always run for API routes + "/(api|trpc)(.*)", + ], +}; |
