Fixed Deployment Issues
This commit is contained in:
parent
d49f09e622
commit
a95becc13b
2 changed files with 32 additions and 4 deletions
4
.env
4
.env
|
|
@ -1,2 +1,4 @@
|
||||||
|
|
||||||
NEXT_PUBLIC_CLERK_ENABLE_KEYLESS=true
|
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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
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import type { Metadata } from "next";
|
|
||||||
import {
|
import {
|
||||||
ClerkProvider,
|
ClerkProvider,
|
||||||
SignInButton,
|
|
||||||
SignUpButton,
|
|
||||||
SignedIn,
|
SignedIn,
|
||||||
SignedOut,
|
SignedOut,
|
||||||
|
SignInButton,
|
||||||
|
SignUpButton,
|
||||||
UserButton,
|
UserButton,
|
||||||
} from "@clerk/nextjs";
|
} from "@clerk/nextjs";
|
||||||
|
import type { Metadata } from "next";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
import "../styles/tailwind.css";
|
import "../styles/tailwind.css";
|
||||||
|
|
||||||
|
|
@ -25,11 +25,37 @@ export const metadata: Metadata = {
|
||||||
description: "Generated by create next app",
|
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({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
children: React.ReactNode;
|
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 (
|
return (
|
||||||
<ClerkProvider>
|
<ClerkProvider>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue