(
name: string,
{ isCustomFeed, isBlocked }: Record<'isCustomFeed' | 'isBlocked', boolean>,
)
| 114 | import { useFeedContentTypeAction } from '../../components/filters/useFeedContentTypeAction'; |
| 115 | |
| 116 | const getBlockLabel = ( |
| 117 | name: string, |
| 118 | { isCustomFeed, isBlocked }: Record<'isCustomFeed' | 'isBlocked', boolean>, |
| 119 | ) => { |
| 120 | const blockLabel = { |
| 121 | global: { |
| 122 | block: `Block ${name}`, |
| 123 | unblock: `Unblock ${name}`, |
| 124 | }, |
| 125 | feed: { |
| 126 | block: `Remove ${name} from this feed`, |
| 127 | unblock: `Add ${name} to this feed`, |
| 128 | }, |
| 129 | }; |
| 130 | |
| 131 | return blockLabel[isCustomFeed ? 'feed' : 'global'][ |
| 132 | isBlocked ? 'unblock' : 'block' |
| 133 | ]; |
| 134 | }; |
| 135 | |
| 136 | const PostOptionButtonContent = ({ |
| 137 | post: initialPost, |
no outgoing calls
no test coverage detected