Improved message box
This commit is contained in:
@@ -1,22 +1,35 @@
|
||||
import MessageBox from "@/components/MessageBox";
|
||||
import AppSidebar from "@/components/Sidebar";
|
||||
|
||||
export default async function Server(params: {params: Promise<{ id: string }>}) {
|
||||
export default async function Server(params: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params.params;
|
||||
|
||||
return (
|
||||
<AppSidebar server={{
|
||||
id: 'bro',
|
||||
name: 'Bro',
|
||||
channels: [
|
||||
{ id: '1', name: 'general', kind: 'text' },
|
||||
{ id: '2', name: 'random', kind: 'text' },
|
||||
{ id: '3', name: 'help', kind: 'text' },
|
||||
{ id: '4', name: 'voice-chat', kind: 'voice' },
|
||||
]
|
||||
}}>
|
||||
<MessageBox />
|
||||
<MessageBox />
|
||||
<AppSidebar
|
||||
server={{
|
||||
id: "bro",
|
||||
name: "Bro",
|
||||
channels: [
|
||||
{ id: "1", name: "general", kind: "text" },
|
||||
{ id: "2", name: "random", kind: "text" },
|
||||
{ id: "3", name: "help", kind: "text" },
|
||||
{ id: "4", name: "voice-chat", kind: "voice" },
|
||||
],
|
||||
}}
|
||||
>
|
||||
<MessageBox
|
||||
messages={[
|
||||
{
|
||||
id: "1",
|
||||
authorId: "user1",
|
||||
content: "Hello, this is a test message!",
|
||||
channelId: "1",
|
||||
timestamp: new Date(),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</AppSidebar>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user