"use client"; import { useState } from "react"; import { useMicrodaoList } from "@/hooks/useMicrodao"; import { DISTRICTS, DISTRICT_COLORS } from "@/lib/microdao"; import Link from "next/link"; export default function MicrodaoListPage() { const [district, setDistrict] = useState(); const [q, setQ] = useState(""); const { items, isLoading, error } = useMicrodaoList({ district, q: q || undefined }); return (
{/* Header */}

MicroDAO

Кластери агентів і організацій у DAARION.city

setQ(e.target.value)} className="bg-slate-800/50 border border-slate-700 rounded-lg px-4 py-2 text-sm text-slate-200 placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500/50" />
{/* Content */} {isLoading ? (
Завантаження...
) : error ? (
Помилка завантаження даних
) : items.length === 0 ? (
{q || district ? "Нічого не знайдено" : "Поки що немає MicroDAO"}
) : (
{items.map((m) => ( {/* Glow effect on hover */}
{/* Title + District */}

{m.name}

{m.description && (

{m.description}

)}
{m.district && ( {m.district} )}
{/* Stats */}
{m.agents_count} агентів
{m.channels_count} каналів
{/* Status indicator */}
{m.is_active ? "Active" : "Inactive"}
))}
)}
); }