Add Clerk authentication and update auth flow for stories and API routes
This commit is contained in:
+26
-24
@@ -1,48 +1,50 @@
|
||||
import type React from "react"
|
||||
import type { Metadata } from "next"
|
||||
import { Inter, Atma, Space_Grotesk, Instrument_Serif } from "next/font/google"
|
||||
import { Analytics } from "@vercel/analytics/next"
|
||||
import { Toaster } from "@/components/ui/toaster"
|
||||
import "./globals.css"
|
||||
import type React from "react";
|
||||
import type { Metadata } from "next";
|
||||
import { Inter, Atma, Space_Grotesk, Instrument_Serif } from "next/font/google";
|
||||
import { Analytics } from "@vercel/analytics/next";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import { ClerkProvider } from "@clerk/nextjs";
|
||||
import "./globals.css";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" })
|
||||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
|
||||
const atma = Atma({
|
||||
weight: ["400", "500", "600", "700"],
|
||||
subsets: ["latin"],
|
||||
variable: "--font-atma",
|
||||
})
|
||||
});
|
||||
const spaceGrotesk = Space_Grotesk({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-space-grotesk",
|
||||
})
|
||||
});
|
||||
const instrumentSerif = Instrument_Serif({
|
||||
weight: ["400"],
|
||||
subsets: ["latin"],
|
||||
variable: "--font-instrument-serif",
|
||||
})
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "MakeComics - AI Comic Generator",
|
||||
description:
|
||||
"Create stunning AI-generated comics in seconds. Choose your style, describe your story, and watch the magic happen.",
|
||||
generator: 'v0.app'
|
||||
}
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
className={`${inter.variable} ${atma.variable} ${spaceGrotesk.variable} ${instrumentSerif.variable}`}
|
||||
>
|
||||
<body className="font-sans antialiased">
|
||||
{children}
|
||||
<Analytics />
|
||||
<Toaster />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
<ClerkProvider>
|
||||
<html
|
||||
lang="en"
|
||||
className={`${inter.variable} ${atma.variable} ${spaceGrotesk.variable} ${instrumentSerif.variable}`}
|
||||
>
|
||||
<body className="font-sans antialiased">
|
||||
{children}
|
||||
<Analytics />
|
||||
<Toaster />
|
||||
</body>
|
||||
</html>
|
||||
</ClerkProvider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user