@@ -197,41 +197,45 @@ const ModuleIssueDetailsPage = () => {
197197
198198 < SecondaryCard icon = { faCodeBranch } title = "Pull Requests" >
199199 < div className = "grid grid-cols-1 gap-3" >
200- { issue . pullRequests ?. map ( ( pr ) => (
201- < div
202- key = { pr . id }
203- className = "flex items-center justify-between gap-3 rounded-lg bg-gray-200 p-4 dark:bg-gray-700"
204- >
205- < div className = "flex items-center gap-3" >
206- < Image
207- src = { pr . author ?. avatarUrl }
208- alt = { pr . author ?. login || 'Unknown' }
209- width = { 32 }
210- height = { 32 }
211- className = "rounded-full"
212- />
213- < div className = "min-w-0 flex-1" >
214- < Link
215- href = { pr . url }
216- target = "_blank"
217- rel = "noopener noreferrer"
218- className = "truncate font-medium text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300"
219- title = { pr . title }
220- >
221- { pr . title }
222- </ Link >
223- < div className = "text-sm text-gray-500 dark:text-gray-400" >
224- by { pr . author ?. login || 'Unknown' } •{ ' ' }
225- { new Date ( pr . createdAt ) . toLocaleDateString ( ) }
200+ { issue . pullRequests ?. length ? (
201+ issue . pullRequests . map ( ( pr ) => (
202+ < div
203+ key = { pr . id }
204+ className = "flex items-center justify-between gap-3 rounded-lg bg-gray-200 p-4 dark:bg-gray-700"
205+ >
206+ < div className = "flex items-center gap-3" >
207+ < Image
208+ src = { pr . author ?. avatarUrl }
209+ alt = { pr . author ?. login || 'Unknown' }
210+ width = { 32 }
211+ height = { 32 }
212+ className = "rounded-full"
213+ />
214+ < div className = "min-w-0 flex-1" >
215+ < Link
216+ href = { pr . url }
217+ target = "_blank"
218+ rel = "noopener noreferrer"
219+ className = "truncate font-medium text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300"
220+ title = { pr . title }
221+ >
222+ { pr . title }
223+ </ Link >
224+ < div className = "text-sm text-gray-500 dark:text-gray-400" >
225+ by { pr . author ?. login || 'Unknown' } •{ ' ' }
226+ { new Date ( pr . createdAt ) . toLocaleDateString ( ) }
227+ </ div >
226228 </ div >
227229 </ div >
230+ < ActionButton url = { pr . url } tooltipLabel = "View PR" >
231+ < FontAwesomeIcon icon = { faLink } />
232+ < span > View PR</ span >
233+ </ ActionButton >
228234 </ div >
229- < ActionButton url = { pr . url } tooltipLabel = "View PR" >
230- < FontAwesomeIcon icon = { faLink } />
231- < span > View PR</ span >
232- </ ActionButton >
233- </ div >
234- ) ) || < span className = "text-sm text-gray-400" > No linked pull requests.</ span > }
235+ ) )
236+ ) : (
237+ < span className = "text-sm text-gray-400" > No linked pull requests.</ span >
238+ ) }
235239 </ div >
236240 </ SecondaryCard >
237241
0 commit comments