feat: Implement scrollable profile card container with sticky pagination.

This commit is contained in:
pradeepkumar
2026-03-19 10:49:07 +05:30
parent 00a7cc68d1
commit a5fb2fda46

View File

@@ -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>