@@ -153,7 +153,6 @@ export default function DefaultTemplate({
153
153
sponsorUrl = { sponsorUrl }
154
154
sponsorImage = { sponsorImage }
155
155
bountyData = { bountyData }
156
- dropdownLinks = { dropdownLinks }
157
156
bountyTimelineObject = { bountyTimelineObject }
158
157
updateBountyTileStatus = { updateBountyTileStatus }
159
158
/> }
@@ -240,7 +239,7 @@ function IsContest({
240
239
updateContestTileStatus : ( ) => void ;
241
240
contestTimelineObject : ContestSchedule | undefined ;
242
241
} ) {
243
- const { contestUrl, amount, findingsRepo } = contestData ;
242
+ const { contestUrl, amount, findingsRepo, startDate , endDate } = contestData ;
244
243
245
244
return (
246
245
< Fragment >
@@ -253,13 +252,14 @@ function IsContest({
253
252
target = "_blank"
254
253
rel = "noreferrer noopener"
255
254
className = "logo"
255
+ onClick = { ( e ) => e . stopPropagation ( ) }
256
256
>
257
- < img
258
- alt = "Sponsor logo"
259
- src = { sponsorImage ?? "/" }
260
- width = { 88 }
261
- height = { 88 }
262
- />
257
+ < img
258
+ alt = "Sponsor logo"
259
+ src = { sponsorImage ?? "/" }
260
+ width = { 88 }
261
+ height = { 88 }
262
+ />
263
263
</ a >
264
264
) : (
265
265
< img
@@ -281,7 +281,12 @@ function IsContest({
281
281
</ small >
282
282
{ /* Contest title */ }
283
283
< h2 className = "title" >
284
- < a href = { contestUrl ? `${ contestData . contestUrl } #top` : '#' } > { title } </ a >
284
+ < a
285
+ href = { contestUrl }
286
+ onClick = { ( e ) => e . stopPropagation ( ) }
287
+ >
288
+ { title }
289
+ </ a >
285
290
</ h2 >
286
291
{ /* Contest description */ }
287
292
< p className = "description" >
@@ -313,30 +318,31 @@ function IsContest({
313
318
< div className = "details" >
314
319
{ contestTimelineObject && < ContestStatus
315
320
className = { `status ${ clsx (
316
- contestTimelineObject . contestStatus === Status . ENDED && "ended"
321
+ contestTimelineObject . contestStatus === Status . ENDED && "ended"
317
322
) } `}
318
323
status = { contestTimelineObject . contestStatus }
319
324
/> }
320
- { contestTimelineObject && contestTimelineObject . contestStatus !== Status . ENDED && (
325
+ { contestData && contestTimelineObject && contestTimelineObject . contestStatus !== Status . ENDED && (
321
326
< div className = "timer" >
322
- < Countdown
323
- start = { contestData . startDate }
324
- end = { contestData . endDate }
325
- updateContestStatus = { updateContestTileStatus }
326
- text = {
327
- contestTimelineObject . contestStatus === Status . UPCOMING
328
- ? "Starts in "
329
- : "Ends in "
330
- }
331
- />
327
+ < Countdown
328
+ start = { startDate }
329
+ end = { endDate }
330
+ updateContestStatus = { updateContestTileStatus }
331
+ text = {
332
+ contestTimelineObject . contestStatus === Status . UPCOMING
333
+ ? "Starts in "
334
+ : "Ends in "
335
+ }
336
+ />
332
337
</ div >
333
338
) }
334
339
</ div >
335
340
< div className = "options" >
336
341
< a
337
342
className = "contest-redirect"
338
343
aria-label = "View audit"
339
- href = { `${ contestData . contestUrl } ` }
344
+ href = { contestUrl }
345
+ onClick = { ( e ) => e . stopPropagation ( ) }
340
346
>
341
347
{ ! findingsRepo || findingsRepo === "" ? "Preview" : "View" } audit
342
348
</ a >
@@ -353,7 +359,6 @@ function IsBounty({
353
359
sponsorUrl,
354
360
sponsorImage,
355
361
bountyData,
356
- dropdownLinks,
357
362
updateBountyTileStatus,
358
363
bountyTimelineObject
359
364
} : {
@@ -362,12 +367,6 @@ function IsBounty({
362
367
sponsorUrl ?: string ;
363
368
sponsorImage ?: string ;
364
369
bountyData : BountyTileData ;
365
- dropdownLinks : {
366
- label : string ;
367
- href : string ;
368
- external ?: boolean ;
369
- ariaLabel ?: string ;
370
- } [ ]
371
370
updateBountyTileStatus ?: ( ) => void ;
372
371
bountyTimelineObject ?: ContestSchedule | undefined ;
373
372
} ) {
@@ -385,6 +384,7 @@ function IsBounty({
385
384
target = "_blank"
386
385
rel = "noreferrer noopener"
387
386
className = "logo"
387
+ onClick = { ( e ) => e . stopPropagation ( ) }
388
388
>
389
389
< img
390
390
alt = "Sponsor logo"
@@ -405,7 +405,12 @@ function IsBounty({
405
405
< div className = "content--wrapper" >
406
406
{ /* Contest title */ }
407
407
< h2 className = "title" >
408
- < a href = { bountyUrl ? `${ bountyUrl } #top` : '#' } > { title } </ a >
408
+ < a
409
+ href = { bountyUrl }
410
+ onClick = { ( e ) => e . stopPropagation ( ) }
411
+ >
412
+ { title }
413
+ </ a >
409
414
</ h2 >
410
415
{ /* Contest description */ }
411
416
< p className = "description" >
@@ -428,7 +433,7 @@ function IsBounty({
428
433
) } `}
429
434
status = { bountyTimelineObject . contestStatus }
430
435
/> }
431
- { bountyTimelineObject && bountyTimelineObject . contestStatus === Status . UPCOMING && (
436
+ { bountyData && bountyTimelineObject && bountyTimelineObject . contestStatus === Status . UPCOMING && (
432
437
< div className = "timer" >
433
438
< Countdown
434
439
start = { startDate }
@@ -443,7 +448,8 @@ function IsBounty({
443
448
< a
444
449
className = "contest-redirect"
445
450
aria-label = "View bounty"
446
- href = { `${ bountyUrl } ` }
451
+ href = { bountyUrl }
452
+ onClick = { ( e ) => e . stopPropagation ( ) }
447
453
>
448
454
View details
449
455
</ a >
0 commit comments