diff --git a/materialious/src/lib/components/AuthorAvatar.svelte b/materialious/src/lib/components/AuthorAvatar.svelte new file mode 100644 index 00000000..92f3aa42 --- /dev/null +++ b/materialious/src/lib/components/AuthorAvatar.svelte @@ -0,0 +1,28 @@ + + +Channel profile + diff --git a/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte b/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte index d00a75a1..f2674220 100644 --- a/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte +++ b/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte @@ -19,8 +19,7 @@ import { queueGetWatchHistory } from '$lib/api/historyPool'; import { page } from '$app/state'; import { getDeArrow, getThumbnailDeArrow } from '$lib/api/dearrow'; - import { avatarFromChannelId } from '$lib/thumbnail'; - import { mergeAttrs } from 'melt'; + import AuthorAvatar from '../AuthorAvatar.svelte'; interface Props { video: VideoBase | Video | Notification | PlaylistPageVideo | VideoWatchHistory; @@ -81,11 +80,6 @@ } }); - let authorAvatarSrc = $state(''); - const authorAvatar = new Avatar({ - src: () => authorAvatarSrc - }); - let startedSideways = sideways === true; function disableSideways() { if (!startedSideways) return; @@ -96,12 +90,6 @@ } onMount(async () => { - if ('authorId' in video) { - avatarFromChannelId(video.authorId).then((url) => { - if (url) authorAvatarSrc = url; - }); - } - // Check if sideways should be enabled or disabled. disableSideways(); @@ -194,14 +182,8 @@