forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.tsx
More file actions
40 lines (38 loc) · 1.23 KB
/
Copy pathlayout.tsx
File metadata and controls
40 lines (38 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { Metadata } from "next";
import "@copilotkit/react-core/v2/styles.css";
import "./globals.css";
export const metadata: Metadata = {
title: "CopilotKit Showcase — LangGraph (Python)",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
const isProd = process.env.NODE_ENV === "production";
return (
<html lang="en">
<body>
{isProd && (
<script
dangerouslySetInnerHTML={{
__html: `
console.log('[showcase] LangGraph Python demo loaded');
console.log('[showcase] URL:', window.location.href);
console.log('[showcase] Referrer:', document.referrer);
console.log('[showcase] In iframe:', window.self !== window.top);
window.addEventListener('error', function(e) {
console.error('[showcase] Uncaught error:', e.message, e.filename, e.lineno);
});
window.addEventListener('unhandledrejection', function(e) {
console.error('[showcase] Unhandled rejection:', e.reason);
});
`,
}}
/>
)}
{children}
</body>
</html>
);
}