MCPcopy Create free account
hub / github.com/dailydotdev/apps / getBlockedMessage

Function getBlockedMessage

packages/shared/src/components/post/block/common.ts:14–30  ·  view source on GitHub ↗
(
  blockedTags: number,
  sourcePreferenceChanged: boolean,
)

Source from the content-addressed store, hash-verified

12 : 0;
13
14export 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};

Callers 2

PostTagsPanelFunction · 0.90
useBlockPostPanelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected