diff --git a/.env b/.env index 1724187..23570db 100644 --- a/.env +++ b/.env @@ -1,2 +1,4 @@ - NEXT_PUBLIC_CLERK_ENABLE_KEYLESS=true +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_c2hhcnAtZmlsbHktNTAuY2xlcmsuYWNjb3VudHMuZGV2JA +CLERK_SECRET_KEY=sk_test_AzxBdooH2w7KLq0GyMPHMANAeK3WtWBqMR9ggFtByK +ANTHROPIC_API_KEY=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 diff --git a/app/layout.tsx b/app/layout.tsx index 5c091f2..61161e2 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,12 +1,12 @@ -import type { Metadata } from "next"; import { ClerkProvider, - SignInButton, - SignUpButton, SignedIn, SignedOut, + SignInButton, + SignUpButton, UserButton, } from "@clerk/nextjs"; +import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "../styles/tailwind.css"; @@ -25,11 +25,37 @@ export const metadata: Metadata = { description: "Generated by create next app", }; +// Check if Clerk is enabled +const isClerkEnabled = + process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY && + process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY !== 'pk_test_YOUR_PUBLISHABLE_KEY'; + export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + // Render the layout without Clerk if it's not enabled + if (!isClerkEnabled) { + return ( + +
+