From f33a4075c9a8418715e2a954769739f6ad089005 Mon Sep 17 00:00:00 2001 From: Nnaji Benjamin <60315147+Benjtalkshow@users.noreply.github.com> Date: Sat, 16 May 2026 00:50:36 +0100 Subject: [PATCH] fix(hackathons): single-column teams tab and primary-colored pager (#562) * fix(hackathons): single-column teams tab and primary-colored pager Revert the teams tab grid to a single column and rework the shared Pagination component to match the icon-chevron layout used by the organizer submissions and participants pages, styled with the primary color. * feat(submissions): link submission card avatars to profile pages Wrap the individual avatar on SubmissionCard in a profile link and forward team-member usernames to GroupAvatar so each clustered avatar opens that user's profile in a new tab. --- .../components/tabs/contents/FindTeam.tsx | 2 +- .../contents/submissions/SubmissionCard.tsx | 20 +++- components/avatars/GroupAvatar.tsx | 38 +++++-- components/ui/pagination.tsx | 100 ++++++++---------- 4 files changed, 96 insertions(+), 64 deletions(-) diff --git a/app/(landing)/hackathons/[slug]/components/tabs/contents/FindTeam.tsx b/app/(landing)/hackathons/[slug]/components/tabs/contents/FindTeam.tsx index 3b2569fd..a279e06e 100644 --- a/app/(landing)/hackathons/[slug]/components/tabs/contents/FindTeam.tsx +++ b/app/(landing)/hackathons/[slug]/components/tabs/contents/FindTeam.tsx @@ -267,7 +267,7 @@ const FindTeam = () => { ) : teams.length > 0 ? ( <> -
+
{teams.map(team => ( {
{isTeam ? ( - m.avatar ?? '')} /> + m.avatar ?? '')} + usernames={teamMembers.map(m => m.username)} + /> + ) : participant?.username ? ( + + + ) : ( { +const GroupAvatar = ({ members, usernames }: GroupAvatarProps) => { const showCount = members.length > 3; const maxVisible = showCount ? 3 : members.length; const visibleMembers = members.slice(0, maxVisible); @@ -18,14 +20,32 @@ const GroupAvatar = ({ members }: GroupAvatarProps) => { return ( - {visibleMembers.map((member, index) => ( - - - - {member.slice(0, 2).toUpperCase()} - - - ))} + {visibleMembers.map((member, index) => { + const username = usernames?.[index]; + const avatar = ( + + + + {member.slice(0, 2).toUpperCase()} + + + ); + if (username) { + return ( + + {avatar} + + ); + } + return
{avatar}
; + })} {remainingCount > 0 && ( +{remainingCount} diff --git a/components/ui/pagination.tsx b/components/ui/pagination.tsx index b127afb7..bf182b55 100644 --- a/components/ui/pagination.tsx +++ b/components/ui/pagination.tsx @@ -1,5 +1,11 @@ import React from 'react'; -import { BoundlessButton } from '../buttons'; +import { + ChevronLeft, + ChevronRight, + ChevronsLeft, + ChevronsRight, +} from 'lucide-react'; +import { Button } from '@/components/ui/button'; interface PaginationProps { currentPage: number; @@ -18,64 +24,52 @@ const Pagination: React.FC = ({ return null; } + const canPrev = currentPage > 1; + const canNext = currentPage < totalPages; + return ( -
-
- +
+
+
Page {currentPage} of {totalPages} - - -
- +
+ + + +