File tree Expand file tree Collapse file tree
app/(landing)/hackathons/[slug]/components/tabs/contents Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919import TeamCard from './teams/TeamCard' ;
2020import MyTeamView from './teams/MyTeamView' ;
2121import { BoundlessButton } from '@/components/buttons/BoundlessButton' ;
22+ import Pagination from '@/components/ui/pagination' ;
2223import {
2324 DropdownMenu ,
2425 DropdownMenuContent ,
@@ -91,6 +92,7 @@ const FindTeam = () => {
9192 const teams = ( teamsResponse ?. data ?. teams || [ ] ) . filter (
9293 t => ! myTeam || t . id !== myTeam . id
9394 ) ;
95+ const totalPages = teamsResponse ?. data ?. pagination ?. totalPages ?? 1 ;
9496
9597 const handleJoin = ( team : Team ) => {
9698 setSelectedTeam ( team ) ;
@@ -264,16 +266,23 @@ const FindTeam = () => {
264266 </ p >
265267 </ div >
266268 ) : teams . length > 0 ? (
267- < div className = 'grid grid-cols-1 gap-6 md:grid-cols-1' >
268- { teams . map ( team => (
269- < TeamCard
270- key = { team . id }
271- team = { team }
272- onJoin = { ( ) => handleJoin ( team ) }
273- onMessageLeader = { handleMessageLeader }
274- />
275- ) ) }
276- </ div >
269+ < >
270+ < div className = 'grid grid-cols-1 gap-6 lg:grid-cols-2' >
271+ { teams . map ( team => (
272+ < TeamCard
273+ key = { team . id }
274+ team = { team }
275+ onJoin = { ( ) => handleJoin ( team ) }
276+ onMessageLeader = { handleMessageLeader }
277+ />
278+ ) ) }
279+ </ div >
280+ < Pagination
281+ currentPage = { page }
282+ totalPages = { totalPages }
283+ onPageChange = { setPage }
284+ />
285+ </ >
277286 ) : (
278287 < div className = 'flex flex-col items-center justify-center space-y-6 rounded-3xl border border-white/5 bg-[#0D0E10] py-24 text-center' >
279288 < div className = 'flex h-20 w-20 items-center justify-center rounded-full bg-white/5' >
You can’t perform that action at this time.
0 commit comments