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

Function getTargetName

packages/shared/src/features/feedExplain/whatsOff.ts:62–69  ·  view source on GitHub ↗
(target: WhatsOffTarget | null | undefined)

Source from the content-addressed store, hash-verified

60
61// A topic reads as its title, or as the raw tag when it has none.
62const 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
71const getTopicCopy = (name: string, mode: string | null | undefined) => {
72 switch (mode) {

Callers 1

getWhatsOffChangeCopyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected