'use client'; import { UsePaginatedQueryReturnType, usePaginatedQuery } from 'convex/react'; import { FunctionReference } from 'convex/server'; import { useState } from 'react'; import { api } from '../../convex/_generated/api'; import { Id } from '../../convex/_generated/dataModel'; import UserProfile from './UserProfile'; type UserSearchResultsPager = UsePaginatedQueryReturnType< FunctionReference< 'query', 'public', { term: string; paginationOpts: { id?: number | undefined; numItems: number; cursor: string | null; }; }, { page: { _id: Id<'users'>; _creationTime: number; clerkUsername: string | null; clerkImageUrl: string; clerkUserId: string; }[]; isDone: boolean; continueCursor: string; } > >; function UserSearchResults({ pager }: { pager: UserSearchResultsPager }) { return (