feat(home): add popular threads box

This commit is contained in:
plebeius.eth
2024-05-02 22:09:41 +02:00
parent 952d446c4d
commit 02b287fc12
4 changed files with 158 additions and 13 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import useFetchGifFirstFrame from '../../hooks/use-fetch-gif-first-frame';
import useCountLinksInReplies from '../../hooks/use-count-links-in-replies';
import styles from './catalog-row.module.css';
const CatalogPostMedia = ({ commentMediaInfo, link }: { commentMediaInfo: any; link: string }) => {
export const CatalogPostMedia = ({ commentMediaInfo }: { commentMediaInfo: any }) => {
const { patternThumbnailUrl, thumbnail, type, url } = commentMediaInfo || {};
const iframeThumbnail = patternThumbnailUrl || thumbnail;
const gifFrameUrl = useFetchGifFirstFrame(type === 'gif' ? url : undefined);
@@ -91,7 +91,7 @@ const CatalogPost = ({ openMenu, post, toggleMenu }: CatalogPostProps) => {
<div className={styles.mediaPaddingWrapper}>
{threadIcons}
<div className={styles.mediaWrapper} style={thumbnailDimensions}>
<CatalogPostMedia commentMediaInfo={commentMediaInfo} link={link} />
<CatalogPostMedia commentMediaInfo={commentMediaInfo} />
</div>
</div>
</Link>
+1 -1
View File
@@ -1 +1 @@
export { default } from './catalog-row';
export { default, CatalogPostMedia } from './catalog-row';