+
+ ({
+ id: channel.id,
+ name: channel.name,
+ icon: iconMap[channel.type],
+ }))
+ },
+ {
+ label: "Voice Channels",
+ type: "channel",
+ data: audioChannels?.map((channel) => ({
+ id: channel.id,
+ name: channel.name,
+ icon: iconMap[channel.type],
+ }))
+ },
+ {
+ label: "Video Channels",
+ type: "channel",
+ data: videoChannels?.map((channel) => ({
+ id: channel.id,
+ name: channel.name,
+ icon: iconMap[channel.type],
+ }))
+ },
+ {
+ label: "Members",
+ type: "member",
+ data: members?.map((member) => ({
+ id: member.id,
+ name: member.profile.name,
+ icon: roleIconMap[member.role],
+ }))
+ },
+ ]}
+ />
+
+
)
}
\ No newline at end of file
diff --git a/components/ui/command.tsx b/components/ui/command.tsx
new file mode 100644
index 0000000..6e83af0
--- /dev/null
+++ b/components/ui/command.tsx
@@ -0,0 +1,155 @@
+"use client"
+
+import * as React from "react"
+import { DialogProps } from "@radix-ui/react-dialog"
+import { Command as CommandPrimitive } from "cmdk"
+import { Search } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { Dialog, DialogContent } from "@/components/ui/dialog"
+
+const Command = React.forwardRef<
+ React.ElementRef