mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-27 17:34:31 +01:00
60 lines
1.6 KiB
TypeScript
60 lines
1.6 KiB
TypeScript
import { QueryClient } from "@tanstack/react-query";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
|
|
import { Toaster } from "../components/ui/sonner";
|
|
import { QueryClientProviderWrapper } from "../lib/api/QueryClientProviderWrapper";
|
|
import { SSEProvider } from "../lib/sse/components/SSEProvider";
|
|
import { RootErrorBoundary } from "./components/RootErrorBoundary";
|
|
|
|
import "./globals.css";
|
|
import { configQuery } from "../lib/api/queries";
|
|
import { SSEEventListeners } from "./components/SSEEventListeners";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
export const fetchCache = "force-no-store";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata = {
|
|
title: "Claude Code Viewer",
|
|
description: "Web Viewer for Claude Code history",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const queryClient = new QueryClient();
|
|
|
|
await queryClient.prefetchQuery({
|
|
queryKey: configQuery.queryKey,
|
|
queryFn: configQuery.queryFn,
|
|
});
|
|
|
|
return (
|
|
<html lang="en">
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
>
|
|
<RootErrorBoundary>
|
|
<QueryClientProviderWrapper>
|
|
<SSEProvider>
|
|
<SSEEventListeners>{children}</SSEEventListeners>
|
|
</SSEProvider>
|
|
</QueryClientProviderWrapper>
|
|
</RootErrorBoundary>
|
|
<Toaster position="top-right" />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|