diff --git a/frontend/src/components/ChannelBanner.tsx b/frontend/src/components/ChannelBanner.tsx
index 513f6336..af37c54a 100644
--- a/frontend/src/components/ChannelBanner.tsx
+++ b/frontend/src/components/ChannelBanner.tsx
@@ -7,9 +7,15 @@ type ChannelIconProps = {
};
const ChannelBanner = ({ channelId, channelBannerUrl }: ChannelIconProps) => {
+ let src = `${getApiUrl()}${channelBannerUrl}`;
+
+ if (channelBannerUrl === undefined) {
+ src = defaultChannelImage;
+ }
+
return (
{
currentTarget.onerror = null; // prevents looping
diff --git a/frontend/src/components/ChannelIcon.tsx b/frontend/src/components/ChannelIcon.tsx
index 6579af68..6a5455e9 100644
--- a/frontend/src/components/ChannelIcon.tsx
+++ b/frontend/src/components/ChannelIcon.tsx
@@ -7,9 +7,15 @@ type ChannelIconProps = {
};
const ChannelIcon = ({ channelId, channelThumbUrl }: ChannelIconProps) => {
+ let src = `${getApiUrl()}${channelThumbUrl}`;
+
+ if (channelThumbUrl === undefined) {
+ src = defaultChannelIcon;
+ }
+
return (
{
currentTarget.onerror = null; // prevents looping
diff --git a/frontend/src/components/DownloadListItem.tsx b/frontend/src/components/DownloadListItem.tsx
index 7a4c5812..28dec4b3 100644
--- a/frontend/src/components/DownloadListItem.tsx
+++ b/frontend/src/components/DownloadListItem.tsx
@@ -22,12 +22,18 @@ const DownloadListItem = ({ download, setRefresh }: DownloadListItemProps) => {
const [hideDownload, setHideDownload] = useState(false);
+ let src = `${getApiUrl()}${download.vid_thumb_url}`;
+
+ if (download.vid_thumb_url === undefined) {
+ src = defaultVideoThumb;
+ }
+
return (
No video found.
; } + let videoThumbSrc = `${getApiUrl()}${video.vid_thumb_url}`; + + if (video.vid_thumb_url === undefined) { + videoThumbSrc = defaultVideoThumb; + } + return (