Fixed Deployment Issues

This commit is contained in:
siri1410 2025-03-28 14:21:51 -04:00
parent d49f09e622
commit a95becc13b
2 changed files with 32 additions and 4 deletions

4
.env
View file

@ -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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

View file

@ -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 (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<header className="flex justify-end items-center p-4 gap-4 h-16">
{/* Placeholder for auth buttons when Clerk is disabled */}
<div className="flex gap-4">
<button className="text-sm font-medium">Sign In</button>
<button className="text-sm font-medium">Sign Up</button>
</div>
</header>
{children}
</body>
</html>
);
}
// Render with Clerk if it's enabled
return (
<ClerkProvider>
<html lang="en">