feat: Implement scrollable profile card container with sticky pagination.
This commit is contained in:
@@ -770,18 +770,18 @@ function ProfilesPageContent() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Profile Cards */}
|
||||
{/* Profile Cards - scrollable container */}
|
||||
{!loading && !error && agents.length > 0 && (
|
||||
<div className="max-h-[calc(100vh-280px)] overflow-y-auto scroll-smooth pr-1 scrollbar-thin">
|
||||
<div className="space-y-4">
|
||||
{agents.map((profile) => (
|
||||
<ProfileCard key={profile.id} profile={profile} resolvedAvatarUrl={avatarUrls[profile.id]} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Pagination */}
|
||||
{!loading && !error && totalPages > 1 && (
|
||||
<div className="flex justify-center items-center gap-2 mt-8 flex-wrap">
|
||||
{totalPages > 1 && (
|
||||
<div className="flex justify-center items-center gap-2 mt-6 pb-2 flex-wrap sticky bottom-0 bg-white/90 backdrop-blur-sm py-3 rounded-[10px]">
|
||||
<button
|
||||
onClick={() => setCurrentPage(p => Math.max(1, p - 1))}
|
||||
disabled={currentPage === 1}
|
||||
@@ -802,6 +802,8 @@ function ProfilesPageContent() {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user