'use client'; import {useState} from 'react'; import Image from 'next/image'; import {UserProfile} from '@/lib/atproto'; import {ChevronDownIcon, ChevronUpIcon} from '@heroicons/react/24/solid'; interface UserListProps { users: UserProfile[]; } export function UserList({users}: UserListProps) { const [isExpanded, setIsExpanded] = useState(false); const INITIAL_COUNT = 8; const displayedUsers = isExpanded ? users : users.slice(0, INITIAL_COUNT); const hasMore = users.length > INITIAL_COUNT; const colors = [ 'bg-red-400', 'bg-blue-400', 'bg-yellow-400', 'bg-green-400', 'bg-purple-400', 'bg-pink-400', 'bg-orange-400', 'bg-cyan-400', ]; return (
{user.displayName || user.handle} {!isInvalidHandle && user.verified && (user.trustedVerifier ? ( ) : ( ))}
{isInvalidHandle ? '⚠️ Invalid Handle' : `@${user.handle}`}