"use client"; import { ChevronRight, Hash, Search } from "lucide-react"; import { useState } from "react"; import { EmptyState, LoadingSkeleton } from "@/components/shared"; import { Card, CardContent } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { useChannels } from "@/hooks"; export function ChannelsSection({ guildId, onSelect, }: { guildId: string; onSelect: (id: string) => void; }) { const [search, setSearch] = useState(""); const { data: channels, isLoading, refetch, } = useChannels(guildId, search || undefined); return (
{ch.channel_name ?? ch.channel_id.slice(0, 8)}
{ch.total_messages} messages {ch.flagged_count > 0 ? ` · ${ch.flagged_count} flagged` : ""}
“{ch.culture_summary}”
)}