From ce8d26dac4d8a3ba6f239f915d4336b2a4c35ed4 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Tue, 12 May 2026 22:26:55 +0100 Subject: only show auth header when auth query param is present --- .../red-right-hand/174bg.net/src/app/layout.js | 24 ++++---------------- .../174bg.net/src/components/AuthHeader/index.js | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 communities/red-right-hand/174bg.net/src/components/AuthHeader/index.js (limited to 'communities/red-right-hand/174bg.net') 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 32d23f4..165be68 100644 --- a/communities/red-right-hand/174bg.net/src/app/layout.js +++ b/communities/red-right-hand/174bg.net/src/app/layout.js @@ -1,13 +1,9 @@ -import { - ClerkProvider, - Show, - SignInButton, - SignUpButton, - UserButton, -} from "@clerk/nextjs"; +import { ClerkProvider } from "@clerk/nextjs"; import { Inter, Fira_Code } from "next/font/google"; +import { Suspense } from "react"; import "./globals.css"; import TerminalOverlay from "@/components/TerminalOverlay"; +import AuthHeader from "@/components/AuthHeader"; const inter = Inter({ variable: "--font-inter", @@ -35,19 +31,7 @@ export default function RootLayout({ children }) { > -
- - - - - - - - - -
+ {children}
diff --git a/communities/red-right-hand/174bg.net/src/components/AuthHeader/index.js b/communities/red-right-hand/174bg.net/src/components/AuthHeader/index.js new file mode 100644 index 0000000..1661421 --- /dev/null +++ b/communities/red-right-hand/174bg.net/src/components/AuthHeader/index.js @@ -0,0 +1,26 @@ +"use client"; + +import { Show, SignInButton, SignUpButton, UserButton } from "@clerk/nextjs"; +import { useSearchParams } from "next/navigation"; + +export default function AuthHeader() { + const searchParams = useSearchParams(); + + if (!searchParams.has("auth")) return null; + + return ( +
+ + + + + + + + + +
+ ); +} -- cgit v1.2.3