( blockedTags: number, sourcePreferenceChanged: boolean, )
| 12 | : 0; |
| 13 | |
| 14 | export const getBlockedMessage = ( |
| 15 | blockedTags: number, |
| 16 | sourcePreferenceChanged: boolean, |
| 17 | ): string => { |
| 18 | if (sourcePreferenceChanged) { |
| 19 | return 'Preferences saved'; |
| 20 | } |
| 21 | |
| 22 | if (blockedTags === 0) { |
| 23 | return 'No topics were blocked'; |
| 24 | } |
| 25 | |
| 26 | const topic = |
| 27 | blockedTags === 1 ? 'topic was blocked' : 'topics are now blocked'; |
| 28 | |
| 29 | return `${blockedTags} ${topic}`; |
| 30 | }; |
no outgoing calls
no test coverage detected