@@ -29,6 +29,7 @@ import Modal from 'components/Modal'
2929import MultiSearchBar from 'components/MultiSearch'
3030import SecondaryCard from 'components/SecondaryCard'
3131import TopContributors from 'components/ToggleContributors'
32+ import { TruncatedText } from 'components/TruncatedText'
3233import { toaster } from 'components/ui/toaster'
3334
3435export default function Home ( ) {
@@ -135,16 +136,16 @@ export default function Home() {
135136 />
136137 </ div >
137138 </ div >
138- < SecondaryCard title = "Upcoming Events" >
139+ < SecondaryCard title = "Upcoming Events" className = "overflow-hidden" >
139140 < div className = "grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3" >
140141 { data . upcomingEvents . map ( ( event : EventType , index : number ) => (
141- < div key = { `card-${ event . name } ` } >
142+ < div key = { `card-${ event . name } ` } className = "overflow-hidden" >
142143 < div className = "rounded-lg bg-gray-200 p-4 dark:bg-gray-700" >
143144 < button
144145 className = "mb-2 w-full text-left text-lg font-semibold text-blue-500 hover:underline"
145146 onClick = { ( ) => setModalOpenIndex ( index ) }
146147 >
147- < h3 className = "truncate text-wrap md:text-nowrap" > { event . name } </ h3 >
148+ < TruncatedText text = { event . name } / >
148149 </ button >
149150 < div className = "flex flex-col flex-wrap items-start text-sm text-gray-600 dark:text-gray-300 md:flex-row" >
150151 < div className = "mr-2 flex items-center" >
@@ -173,13 +174,13 @@ export default function Home() {
173174 </ div >
174175 </ SecondaryCard >
175176 < div className = "grid gap-4 md:grid-cols-2" >
176- < SecondaryCard title = "New Chapters" >
177+ < SecondaryCard title = "New Chapters" className = "overflow-hidden" >
177178 < div className = "space-y-4" >
178179 { data . recentChapters . map ( ( chapter ) => (
179180 < div key = { chapter . key } className = "rounded-lg bg-gray-200 p-4 dark:bg-gray-700" >
180181 < h3 className = "mb-2 text-lg font-semibold" >
181182 < a href = { `/chapters/${ chapter . key } ` } className = "hover:underline" >
182- { chapter . name }
183+ < TruncatedText text = { chapter . name } />
183184 </ a >
184185 </ h3 >
185186 < div className = "flex flex-wrap items-center text-sm text-gray-600 dark:text-gray-300" >
@@ -202,15 +203,15 @@ export default function Home() {
202203 ) ) }
203204 </ div >
204205 </ SecondaryCard >
205- < SecondaryCard title = "New Projects" >
206+ < SecondaryCard title = "New Projects" className = "overflow-hidden" >
206207 < div className = "space-y-4" >
207208 { data . recentProjects . map ( ( project ) => (
208209 < div key = { project . key } className = "rounded-lg bg-gray-200 p-4 dark:bg-gray-700" >
209- < h3 className = "mb-2 text-lg font-semibold " >
210- < a href = { `/projects/ ${ project . key } ` } className = "hover:underline " >
211- { project . name }
212- </ a >
213- </ h3 >
210+ < a href = { `/projects/ ${ project . key } ` } className = "hover:underline " >
211+ < h3 className = "mb-2 truncate text-wrap text-lg font-semibold md:text-nowrap " >
212+ < TruncatedText text = { project . name } />
213+ </ h3 >
214+ </ a >
214215 < div className = "flex flex-wrap items-center text-sm text-gray-600 dark:text-gray-300" >
215216 < div className = "mr-4 flex items-center" >
216217 < FontAwesomeIcon icon = { faCalendar } className = "mr-2 h-4 w-4" />
@@ -280,22 +281,22 @@ export default function Home() {
280281 ) }
281282 />
282283 </ div >
283- < SecondaryCard title = "Recent News & Opinions" >
284+ < SecondaryCard title = "Recent News & Opinions" className = "overflow-hidden" >
284285 < div className = "grid gap-4 sm:grid-cols-1 md:grid-cols-2" >
285286 { data . recentPosts . map ( ( post ) => (
286287 < div
287288 key = { post . title }
288- className = "rounded-lg bg-gray-200 p-4 dark:bg-gray-700"
289+ className = "overflow-hidden rounded-lg bg-gray-200 p-4 dark:bg-gray-700"
289290 data-testid = "post-container"
290291 >
291- < h3 className = "mb-1 truncate text-wrap text- lg font-semibold text-blue-500 md:text-nowrap " >
292+ < h3 className = "mb-1 text-lg font-semibold" >
292293 < a
293294 href = { post . url }
294- className = "hover:underline"
295+ className = "text-blue-500 hover:underline"
295296 target = "_blank"
296297 rel = "noopener noreferrer"
297298 >
298- { post . title }
299+ < TruncatedText text = { post . title } />
299300 </ a >
300301 </ h3 >
301302 < div className = "mt-2 flex flex-col flex-wrap items-start text-sm text-gray-600 dark:text-gray-300 md:flex-row" >
0 commit comments