| 1 |
import React from 'react' |
| 2 |
import { __ } from '@wordpress/i18n' |
| 3 |
import type { DuplicateReport } from '../../types/Feedback' |
| 4 |
|
| 5 |
export interface DuplicateReportsProps { |
| 6 |
reports: DuplicateReport[] |
| 7 |
} |
| 8 |
|
| 9 |
export const DuplicateReports: React.FC<DuplicateReportsProps> = ({ reports }) => |
| 10 |
0 < reports.length && |
| 11 |
<div className="code-snippets-feedback-duplicates"> |
| 12 |
<p>{__('Existing reports that look similar', 'code-snippets')}</p> |
| 13 |
<ul> |
| 14 |
{reports.map(report => |
| 15 |
<li key={report.url}> |
| 16 |
<a href={report.url} target="_blank" rel="noopener noreferrer">{report.title}</a> |
| 17 |
</li> |
| 18 |
)} |
| 19 |
</ul> |
| 20 |
</div> |
| 21 |
|