( post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null, )
| 70 | ): boolean => post?.type === PostType.SocialTwitter; |
| 71 | |
| 72 | export const isSocialTwitterShareLike = ( |
| 73 | post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null, |
| 74 | ): boolean => { |
| 75 | if (!post || !isSocialTwitterPost(post)) { |
| 76 | return false; |
| 77 | } |
| 78 | |
| 79 | if (!post.sharedPost) { |
| 80 | return false; |
| 81 | } |
| 82 | |
| 83 | return ['quote', 'repost'].includes(post.subType || ''); |
| 84 | }; |
| 85 | |
| 86 | export const getSocialTwitterPostType = ( |
| 87 | post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null, |
no test coverage detected