(target: WhatsOffTarget | null | undefined)
| 60 | |
| 61 | // A topic reads as its title, or as the raw tag when it has none. |
| 62 | const getTargetName = (target: WhatsOffTarget | null | undefined): string => { |
| 63 | if (!target) { |
| 64 | return ''; |
| 65 | } |
| 66 | return target.type === WhatsOffTargetType.Keyword && target.name === target.id |
| 67 | ? `#${target.id}` |
| 68 | : target.name; |
| 69 | }; |
| 70 | |
| 71 | const getTopicCopy = (name: string, mode: string | null | undefined) => { |
| 72 | switch (mode) { |
no outgoing calls
no test coverage detected