mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(home): remove fallback image warning
This commit is contained in:
@@ -18,7 +18,6 @@ const RecentThread = ({ commentCid }) => {
|
||||
const subplebbit = useSubplebbit({ subplebbitAddress: comment?.subplebbitAddress });
|
||||
const { setSelectedAddress, setSelectedTitle } = useGeneralStore((state) => state);
|
||||
const commentMediaInfo = getCommentMediaInfo(comment);
|
||||
const fallbackImgUrl = 'assets/filedeleted-res.gif';
|
||||
const isMediaShowed =
|
||||
comment.link &&
|
||||
commentMediaInfo &&
|
||||
@@ -51,14 +50,7 @@ const RecentThread = ({ commentCid }) => {
|
||||
) : commentMediaInfo?.type === 'image' ? (
|
||||
<img className='board-avatar' src={commentMediaInfo?.url} alt='post' />
|
||||
) : commentMediaInfo?.type === 'video' ? (
|
||||
<video
|
||||
className='board-avatar'
|
||||
src={commentMediaInfo?.url}
|
||||
onError={(e) => {
|
||||
e.target.src = fallbackImgUrl;
|
||||
}}
|
||||
alt='post'
|
||||
/>
|
||||
<video className='board-avatar' src={commentMediaInfo?.url} alt='post' />
|
||||
) : commentMediaInfo?.type === 'iframe' ? (
|
||||
<img className='board-avatar' src={commentMediaInfo?.thumbnail} alt='post' />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user