| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow |
| 8 | */ |
| 9 | |
| 10 | import type {GitHubIssue} from './githubAPI'; |
| 11 | |
| 12 | import * as React from 'react'; |
| 13 | import Icon from '../Icon'; |
| 14 | import styles from './shared.css'; |
| 15 | |
| 16 | export default function UpdateExistingIssue({ |
| 17 | gitHubIssue, |
| 18 | }: { |
| 19 | gitHubIssue: GitHubIssue, |
| 20 | }): React.Node { |
| 21 | const {title, url} = gitHubIssue; |
| 22 | return ( |
| 23 | <div className={styles.GitHubLinkRow}> |
| 24 | <Icon className={styles.ReportIcon} type="bug" /> |
| 25 | <div className={styles.UpdateExistingIssuePrompt}> |
| 26 | Update existing issue: |
| 27 | </div> |
| 28 | <a |
| 29 | className={styles.ReportLink} |
| 30 | href={url} |
| 31 | rel="noopener noreferrer" |
| 32 | target="_blank" |
| 33 | title="Report bug"> |
| 34 | {title} |
| 35 | </a> |
| 36 | </div> |
| 37 | ); |
| 38 | } |