@@ -6,6 +6,7 @@ import { useEffect, useMemo, useState } from 'react'
66
77import {
88 CANDIDATES_FEATURED_POSITIONS ,
9+ CANDIDATES_ROUND_FOUR_POSITIONS ,
910 CANDIDATES_ROUND_THREE_POSITIONS ,
1011 CANDIDATES_ROUND_TWO_POSITIONS ,
1112 CANDIDATES_WARMUP_POSITIONS ,
@@ -63,6 +64,9 @@ const ChallengeSectionTitle: React.FC<{ title: string }> = ({ title }) => (
6364 </ div >
6465)
6566
67+ const shouldCompactTitles = ( positions : CandidatePosition [ ] ) =>
68+ positions . every ( ( position ) => position . title . length <= 38 )
69+
6670const PositionBoard : React . FC < {
6771 position : CandidatePosition
6872 completed ?: boolean
@@ -136,14 +140,14 @@ const PositionPill: React.FC<{
136140 < div className = "flex h-full flex-col gap-4" >
137141 < div
138142 className = { `min-w-0 ${
139- compactTitle ? 'xl:min-h-[132px ]' : 'xl:min-h-[150px]'
143+ compactTitle ? 'xl:min-h-[122px ]' : 'xl:min-h-[150px]'
140144 } `}
141145 >
142146 < h2
143- className = { `overflow-hidden text-lg font-semibold text-primary md:text-xl ${
147+ className = { `text-lg font-semibold leading-[1.5rem] text-primary md:text-xl md:leading-[1.75rem] ${
144148 compactTitle
145- ? 'h-[1.5rem] leading-[1.5rem] md:h-[1.75rem] md:leading -[1.75rem]'
146- : 'h-[3rem] leading-[1.5rem] md :h-[3.5rem] md:leading-[1.75rem] '
149+ ? 'xl:h -[1.75rem]'
150+ : 'xl :h-[3.5rem] xl:overflow-hidden '
147151 } `}
148152 >
149153 { position . title }
@@ -203,6 +207,19 @@ export default function CandidatesPage() {
203207 const [ completedChallengeIds , setCompletedChallengeIds ] = useState < string [ ] > (
204208 [ ] ,
205209 )
210+ const compactFeaturedTitles = shouldCompactTitles (
211+ CANDIDATES_FEATURED_POSITIONS ,
212+ )
213+ const compactRoundFourTitles = shouldCompactTitles (
214+ CANDIDATES_ROUND_FOUR_POSITIONS ,
215+ )
216+ const compactRoundThreeTitles = shouldCompactTitles (
217+ CANDIDATES_ROUND_THREE_POSITIONS ,
218+ )
219+ const compactRoundTwoTitles = shouldCompactTitles (
220+ CANDIDATES_ROUND_TWO_POSITIONS ,
221+ )
222+ const compactRoundOneTitles = shouldCompactTitles ( CANDIDATES_WARMUP_POSITIONS )
206223 const completedChallengeId =
207224 typeof router . query . completedChallenge === 'string'
208225 ? router . query . completedChallenge
@@ -257,7 +274,7 @@ export default function CandidatesPage() {
257274 FIDE Candidates Tournament 2026
258275 </ h1 >
259276 < p className = "mt-2 text-sm uppercase tracking-[0.2em] text-white/45" >
260- Round 4
277+ Round 8
261278 </ p >
262279 < div className = "mt-4 flex flex-wrap gap-3" >
263280 < Link
@@ -282,12 +299,26 @@ export default function CandidatesPage() {
282299 </ header >
283300 { CANDIDATES_FEATURED_POSITIONS . length > 0 ? (
284301 < >
285- < ChallengeSectionTitle title = "Round 4 Challenges" />
302+ < ChallengeSectionTitle title = "Round 8 Challenges" />
286303 { CANDIDATES_FEATURED_POSITIONS . map ( ( position ) => (
287304 < PositionPill
288305 key = { position . id }
289306 position = { position }
290307 completed = { completedChallengeIds . includes ( position . id ) }
308+ compactTitle = { compactFeaturedTitles }
309+ />
310+ ) ) }
311+ </ >
312+ ) : null }
313+ { CANDIDATES_ROUND_FOUR_POSITIONS . length > 0 ? (
314+ < >
315+ < ChallengeSectionTitle title = "Round 4 Challenges" />
316+ { CANDIDATES_ROUND_FOUR_POSITIONS . map ( ( position ) => (
317+ < PositionPill
318+ key = { position . id }
319+ position = { position }
320+ completed = { completedChallengeIds . includes ( position . id ) }
321+ compactTitle = { compactRoundFourTitles }
291322 />
292323 ) ) }
293324 </ >
@@ -300,6 +331,7 @@ export default function CandidatesPage() {
300331 key = { position . id }
301332 position = { position }
302333 completed = { completedChallengeIds . includes ( position . id ) }
334+ compactTitle = { compactRoundThreeTitles }
303335 />
304336 ) ) }
305337 </ >
@@ -312,6 +344,7 @@ export default function CandidatesPage() {
312344 key = { position . id }
313345 position = { position }
314346 completed = { completedChallengeIds . includes ( position . id ) }
347+ compactTitle = { compactRoundTwoTitles }
315348 />
316349 ) ) }
317350 </ >
@@ -324,6 +357,7 @@ export default function CandidatesPage() {
324357 key = { position . id }
325358 position = { position }
326359 completed = { completedChallengeIds . includes ( position . id ) }
360+ compactTitle = { compactRoundOneTitles }
327361 />
328362 ) ) }
329363 </ >
0 commit comments