@@ -251,22 +251,22 @@ export function DiscoverContainer() {
251251 // Teams looking for members -- only for non-leads who can see the list
252252 shouldFetchLists && ! userIsLead
253253 ? fetch (
254- `${ API_ENDPOINTS . lookingForMembers } ${ queryParams } ${ queryParams ? "&" : "?" } page=${ teamsPage } &limit=${ ITEMS_PER_PAGE } ` ,
255- { method : "GET" , headers } ,
256- )
254+ `${ API_ENDPOINTS . lookingForMembers } ${ queryParams } ${ queryParams ? "&" : "?" } page=${ teamsPage } &limit=${ ITEMS_PER_PAGE } ` ,
255+ { method : "GET" , headers } ,
256+ )
257257 : Promise . resolve ( null as any ) ,
258258 // Operators looking for teams
259259 shouldFetchLists
260260 ? fetch (
261- `${ API_ENDPOINTS . lookingForTeam } ${ queryParams } ${ queryParams ? "&" : "?" } page=${ participantsPage } &limit=${ ITEMS_PER_PAGE } ` ,
262- { method : "GET" , headers } ,
263- )
261+ `${ API_ENDPOINTS . lookingForTeam } ${ queryParams } ${ queryParams ? "&" : "?" } page=${ participantsPage } &limit=${ ITEMS_PER_PAGE } ` ,
262+ { method : "GET" , headers } ,
263+ )
264264 : Promise . resolve ( null as any ) ,
265265 // Sent invites by this team -- only if user is the lead of their team
266266 isLeadLocal && user ?. teamCode
267267 ? fetch ( `${ API_ENDPOINTS . joinRequest } ?teamCode=${ user . teamCode } ` , {
268- headers,
269- } )
268+ headers,
269+ } )
270270 : Promise . resolve ( null as any ) ,
271271 ] ) ;
272272 const [ teamsSettled , participantsSettled , sentInvitesSettled ] = phase2 ;
@@ -296,7 +296,7 @@ export function DiscoverContainer() {
296296 if ( teamsData . data . pagination ) {
297297 setTeamsPagination ( {
298298 totalPages : teamsData . data . pagination . totalPages || 1 ,
299- total : teamsData . data . pagination . total || 0 ,
299+ total : teamsData . data . pagination . totalTeams || 0 ,
300300 } ) ;
301301 }
302302 } else {
@@ -339,7 +339,7 @@ export function DiscoverContainer() {
339339 if ( participantsData . data . pagination ) {
340340 setParticipantsPagination ( {
341341 totalPages : participantsData . data . pagination . totalPages || 1 ,
342- total : participantsData . data . pagination . total || 0 ,
342+ total : participantsData . data . pagination . totalUsers || 0 ,
343343 } ) ;
344344 }
345345 } else {
@@ -720,7 +720,7 @@ export function DiscoverContainer() {
720720 < >
721721 { /* HERO. compact operator strip */ }
722722 < div className = "relative overflow-hidden" >
723- < div className = "relative flex items-end justify-between gap-4 flex-wrap" >
723+ < div className = "relative flex items-end justify-between gap-4 flex-wrap" >
724724 < div className = "flex flex-col gap-1.5 min-w-0" >
725725 < div className = "flex items-center gap-2" >
726726 < span className = "inline-flex w-1.5 h-1.5 rounded-full bg-brand shadow-glow-sm anim-blink" />
@@ -752,14 +752,14 @@ export function DiscoverContainer() {
752752 </ div >
753753 </ div >
754754
755- { userHasTeam && ! isTeamLead ? (
755+ { userHasTeam && ( ! isTeamLead || ( isTeamLead && teamCapacity && teamCapacity . current >= teamCapacity . max ) ) ? (
756756 < Card hudCorners >
757757 < div className = "flex flex-col items-center justify-center px-6 py-12 text-center gap-4" >
758758 < span className = "inline-flex w-12 h-12 items-center justify-center rounded-md bg-brand-soft border border-brand/40" >
759759 < Lock className = "w-5 h-5 text-brand" />
760760 </ span >
761761 < div className = "font-mono text-[10.5px] uppercase tracking-[0.22em] text-brand" >
762- > Already enlisted
762+ > { isTeamLead ? "Team Full" : " Already enlisted" }
763763 </ div >
764764 < h2 className = "font-heading text-[22px] font-bold text-ink leading-tight" >
765765 You ride with{ " " }
@@ -768,7 +768,9 @@ export function DiscoverContainer() {
768768 </ span >
769769 </ h2 >
770770 < p className = "text-[13px] text-ink-secondary font-body max-w-[44ch] leading-relaxed" >
771- Leave the current squad if you want to scout new ones. Recruitment is locked to leads only.
771+ { isTeamLead
772+ ? "Your squad has reached its maximum capacity. You must remove members if you want to recruit new ones."
773+ : "Leave the current squad if you want to scout new ones. Recruitment is locked to leads only." }
772774 </ p >
773775 < Button
774776 onClick = { ( ) => router . push ( "/dashboard" ) }
@@ -833,7 +835,7 @@ export function DiscoverContainer() {
833835 < div className = "px-3 pb-3 pt-1 text-[12px] text-ink-secondary font-body leading-relaxed" >
834836 Going public exposes your{ " " }
835837 < span className = "text-ink" > name, bio, organisation, profile picture, resume,
836- and social links</ span > { " " }
838+ and social links</ span > { " " }
837839 to other operators. Strip phone numbers, addresses, and personal emails from your resume before publishing.
838840 </ div >
839841 </ details >
@@ -1218,7 +1220,7 @@ export function DiscoverContainer() {
12181220 }
12191221 disabled = {
12201222 participantsPage >=
1221- participantsPagination . totalPages || isLoading
1223+ participantsPagination . totalPages || isLoading
12221224 }
12231225 className = "inline-flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-[0.22em] text-ink-secondary hover:text-brand disabled:opacity-30 disabled:hover:text-ink-secondary disabled:cursor-not-allowed transition-colors px-2 py-1.5 rounded"
12241226 >
0 commit comments