(item: FeedItem, index: number)
| 113 | Pick<UseBookmarkPost, 'toggleBookmark'>; |
| 114 | |
| 115 | export function getFeedItemKey(item: FeedItem, index: number): string { |
| 116 | switch (item.type) { |
| 117 | case 'post': |
| 118 | return item.post.id; |
| 119 | case 'highlight': |
| 120 | return getHighlightIdsKey(item.highlights) || `highlight-${index}`; |
| 121 | case 'ad': |
| 122 | return `ad-${index}`; |
| 123 | default: |
| 124 | return `placeholder-${index}`; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 129 | const PostTypeToTagCard: Record<PostType, React.ComponentType<any>> = { |
no test coverage detected