( post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null, )
| 63 | ): boolean => post?.type === PostType.SocialTwitter; |
| 64 | |
| 65 | export const isSocialTwitterShareLike = ( |
| 66 | post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null, |
| 67 | ): boolean => { |
| 68 | if (!post || !isSocialTwitterPost(post)) { |
| 69 | return false; |
| 70 | } |
| 71 | |
| 72 | if (!post.sharedPost) { |
| 73 | return false; |
| 74 | } |
| 75 | |
| 76 | return ['quote', 'repost'].includes(post.subType || ''); |
| 77 | }; |
| 78 | |
| 79 | export const getSocialTwitterPostType = ( |
| 80 | post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null, |
no test coverage detected