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