diff --git a/app/chat-list.tsx b/app/chat-list.tsx index 22ddbc4..ef151da 100644 --- a/app/chat-list.tsx +++ b/app/chat-list.tsx @@ -5,6 +5,7 @@ import { type Message } from "@prisma/client"; import { ChatMessage } from "./chat-message"; import { NextChatLogo } from "@/components/ui/nextchat-logo"; import { Plus } from "lucide-react"; +import { EmptyScreen } from "./empty"; export interface ChatList { messages: Message[]; @@ -36,7 +37,9 @@ export function ChatList({ messages }: ChatList) { /> ))} - ) : null} + ) : ( + + )} ); diff --git a/app/empty.tsx b/app/empty.tsx new file mode 100644 index 0000000..731dd6d --- /dev/null +++ b/app/empty.tsx @@ -0,0 +1,56 @@ +import { cn } from "@/lib/utils"; +import { ExternalLink } from "./external-link"; +import { fontMessage } from "@/lib/fonts"; + +function ExampleBubble({ children }: { children?: React.ReactNode }) { + return ( +
+
+

{children}

+
+ ); +} + +export function EmptyScreen() { + return ( +
+
+
+
+

Welcome to Next.js Chatbot!

+

+ This is an open source AI chatbot app built with{" "} + Next.js and{" "} + + Vercel Postgres + + . You can start a conversation here or try the following examples: +

+
+
+
+ Explain technical concepts + Summarize article + Get assistance + Draft an email +
+
+
+ ); +} diff --git a/app/external-link.tsx b/app/external-link.tsx new file mode 100644 index 0000000..7025ee5 --- /dev/null +++ b/app/external-link.tsx @@ -0,0 +1,29 @@ +export function ExternalLink({ + href, + children, +}: { + href: string; + children: React.ReactNode; +}) { + return ( + + {children} + + + ); +} diff --git a/app/sidebar.tsx b/app/sidebar.tsx index d43cd82..834c180 100644 --- a/app/sidebar.tsx +++ b/app/sidebar.tsx @@ -8,6 +8,7 @@ import { Plus } from "lucide-react"; import Link from "next/link"; import { unstable_cache } from "next/cache"; import { SidebarItem } from "./sidebar-item"; +import { ExternalLink } from "./external-link"; export interface SidebarProps { session?: Session; @@ -48,6 +49,33 @@ export function Sidebar({ session, newChat }: SidebarProps) { + +
+
+ + + + + Deploy + + + View on GitHub + +
+
diff --git a/components/ui/nextchat-logo.tsx b/components/ui/nextchat-logo.tsx index 37266a5..2fcd355 100644 --- a/components/ui/nextchat-logo.tsx +++ b/components/ui/nextchat-logo.tsx @@ -1,6 +1,8 @@ import { useId } from "react"; -export function NextChatLogo(props: JSX.IntrinsicElements["svg"]) { +export function NextChatLogo( + props: JSX.IntrinsicElements["svg"] & { inverted?: boolean } +) { const id = useId(); return ( - - + + - - + + - + - +