let post = this.props.post;
return (
<img
- className={`img-fluid thumbnail rounded ${(post.nsfw ||
- post.community_nsfw) &&
- 'img-blur'}`}
+ className={`img-fluid thumbnail rounded ${
+ (post.nsfw || post.community_nsfw) && 'img-blur'
+ }`}
src={src}
/>
);
if (isImage(post.url)) {
if (post.url.includes('pictshare')) {
return pictshareImage(post.url, thumbnail);
+ } else if (post.thumbnail_url) {
+ return pictshareImage(post.thumbnail_url, thumbnail);
} else {
return post.url;
}
}
>
<svg
- class={`icon icon-inline ${post.saved &&
- 'text-warning'}`}
+ class={`icon icon-inline ${
+ post.saved && 'text-warning'
+ }`}
>
<use xlinkHref="#icon-star"></use>
</svg>
}
>
<svg
- class={`icon icon-inline ${post.deleted &&
- 'text-danger'}`}
+ class={`icon icon-inline ${
+ post.deleted && 'text-danger'
+ }`}
>
<use xlinkHref="#icon-trash"></use>
</svg>
data-tippy-content={i18n.t('view_source')}
>
<svg
- class={`icon icon-inline ${this.state
- .viewSource && 'text-success'}`}
+ class={`icon icon-inline ${
+ this.state.viewSource && 'text-success'
+ }`}
>
<use xlinkHref="#icon-file-text"></use>
</svg>
}
>
<svg
- class={`icon icon-inline ${post.locked &&
- 'text-danger'}`}
+ class={`icon icon-inline ${
+ post.locked && 'text-danger'
+ }`}
>
<use xlinkHref="#icon-lock"></use>
</svg>
}
>
<svg
- class={`icon icon-inline ${post.stickied &&
- 'text-success'}`}
+ class={`icon icon-inline ${
+ post.stickied && 'text-success'
+ }`}
>
<use xlinkHref="#icon-pin"></use>
</svg>