-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(blocks): add chat dashboard block
- Loading branch information
1 parent
5f7957a
commit 3d02dbe
Showing
37 changed files
with
11,201 additions
and
5,289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { AppSidebar } from "@/registry/default/blocks/chat-01/components/app-sidebar" | ||
import { Chat } from "@/registry/default/blocks/chat-01/components/chat" | ||
import { ChatHeader } from "@/registry/default/blocks/chat-01/components/chat-header" | ||
import { ChatInput } from "@/registry/default/blocks/chat-01/components/chat-input" | ||
import { ChatSidebar } from "@/registry/default/blocks/chat-01/components/chat-sidebar" | ||
import { SidebarInset, SidebarProvider } from "@/registry/default/ui/sidebar" | ||
|
||
const messages = [ | ||
{ | ||
sender: "@miajohnson", | ||
message: "Hey! How was your weekend?", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@me", | ||
message: "It was great! I went hiking. How about you?", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@miajohnson", | ||
message: | ||
"Nice! I just relaxed at home. Check out this photo from my garden.", | ||
image: "/placeholder.svg", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@me", | ||
message: "Wow, your garden looks amazing! I need to get some tips.", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@miajohnson", | ||
message: "Sure! I can send you my gardening guide.", | ||
file: { | ||
name: "gardening_guide.pdf", | ||
type: "application/pdf", | ||
url: "/placeholder.svg", | ||
size: 2.3, | ||
pages: 12, | ||
}, | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@me", | ||
message: "That would be awesome! Thanks!", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@miajohnson", | ||
message: "By the way, did you watch the game last night?", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@me", | ||
message: | ||
"Yes! It was intense! I can't believe they won in the last minute.", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@miajohnson", | ||
message: "I know, right? Let me send you the highlights.", | ||
link: "https://example.com/highlights", | ||
timestamp: new Date(), | ||
}, | ||
{ | ||
sender: "@me", | ||
message: "Perfect! I can't wait to watch them.", | ||
timestamp: new Date(), | ||
}, | ||
] | ||
|
||
export default function Home() { | ||
return ( | ||
<div className="flex h-screen flex-1"> | ||
<SidebarProvider> | ||
<AppSidebar /> | ||
<ChatSidebar /> | ||
<SidebarInset> | ||
<ChatHeader /> | ||
<Chat messages={messages} /> | ||
<ChatInput /> | ||
</SidebarInset> | ||
</SidebarProvider> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.