(synonyms: readonly SynonymType[])
| 12 | } from '__generated__/RepoTopicSynonyms_repoTopic.graphql' |
| 13 | |
| 14 | function name(synonyms: readonly SynonymType[]) { |
| 15 | if (synonyms.length > 0) { |
| 16 | for (const synonym of synonyms) { |
| 17 | if (synonym.locale !== 'en') // FIXME |
| 18 | continue |
| 19 | return synonym.name |
| 20 | } |
| 21 | return synonyms[0].name |
| 22 | } |
| 23 | |
| 24 | return 'Missing name' |
| 25 | } |
| 26 | |
| 27 | function displayName(synonyms: readonly SynonymType[], timerangPrefix: string | null) { |
| 28 | const suffix = name(synonyms) |