Skip to content

Commit 76976a0

Browse files
committed
chore: hide demo gallery panel from UI
Demo gallery preserved on feat/demo-gallery branch for future work.
1 parent f3a145c commit 76976a0

1 file changed

Lines changed: 1 addition & 37 deletions

File tree

apps/app/src/app/page.tsx

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,15 @@
11
"use client";
22

3-
import { useEffect, useState } from "react";
3+
import { useEffect } from "react";
44
import { ExampleLayout } from "@/components/example-layout";
55
import { useGenerativeUIExamples, useExampleSuggestions } from "@/hooks";
66
import { ExplainerCardsPortal } from "@/components/explainer-cards";
7-
import { DemoGallery, type DemoItem } from "@/components/demo-gallery";
8-
97
import { CopilotChat } from "@copilotkit/react-core/v2";
10-
import { useCopilotChat } from "@copilotkit/react-core";
118

129
export default function HomePage() {
1310
useGenerativeUIExamples();
1411
useExampleSuggestions();
1512

16-
const [demoDrawerOpen, setDemoDrawerOpen] = useState(false);
17-
const { appendMessage } = useCopilotChat();
18-
19-
const handleTryDemo = (demo: DemoItem) => {
20-
setDemoDrawerOpen(false);
21-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
22-
appendMessage({ content: demo.prompt, role: "user" } as any);
23-
};
24-
2513
// Widget bridge: handle messages from widget iframes
2614
useEffect(() => {
2715
const handler = (e: MessageEvent) => {
@@ -67,25 +55,6 @@ export default function HomePage() {
6755
</p>
6856
</div>
6957
<div className="flex items-center gap-2">
70-
<button
71-
onClick={() => setDemoDrawerOpen(true)}
72-
className="inline-flex items-center gap-1.5 px-3 py-2 rounded-full text-sm font-medium no-underline whitespace-nowrap transition-all duration-150 hover:-translate-y-px cursor-pointer"
73-
style={{
74-
color: "var(--text-secondary)",
75-
border: "1px solid var(--color-border-glass, rgba(0,0,0,0.1))",
76-
background: "var(--surface-primary, rgba(255,255,255,0.6))",
77-
fontFamily: "var(--font-family)",
78-
}}
79-
title="Open Demo Gallery"
80-
>
81-
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
82-
<rect width="7" height="7" x="3" y="3" rx="1" />
83-
<rect width="7" height="7" x="14" y="3" rx="1" />
84-
<rect width="7" height="7" x="14" y="14" rx="1" />
85-
<rect width="7" height="7" x="3" y="14" rx="1" />
86-
</svg>
87-
Demos
88-
</button>
8958
<a
9059
href="https://github.com/CopilotKit/OpenGenerativeUI"
9160
target="_blank"
@@ -114,11 +83,6 @@ export default function HomePage() {
11483
</div>
11584
</div>
11685

117-
<DemoGallery
118-
open={demoDrawerOpen}
119-
onClose={() => setDemoDrawerOpen(false)}
120-
onTryDemo={handleTryDemo}
121-
/>
12286
</>
12387
);
12488
}

0 commit comments

Comments
 (0)