From 7f915149dc8bd9cb671d0cdb10fc3726131a8b83 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sun, 7 Jul 2024 10:35:44 +0200 Subject: [PATCH] change avatar from dicebear to vercel --- src/lib/components/CommentSection.svelte | 2 +- src/lib/components/CreateNewPost.svelte | 2 +- src/lib/components/PostSection.svelte | 2 +- src/lib/components/TopInvestors.svelte | 2 +- src/routes/+layout.svelte | 4 ++-- src/routes/blog/+page.svelte | 2 +- src/routes/blog/article/[slug]/+page.svelte | 2 +- src/routes/community/post/[postId]/+page.svelte | 2 +- src/routes/community/profile/+page.svelte | 2 +- src/routes/community/user/[userId]/+page.svelte | 2 +- src/routes/leaderboard/+page.svelte | 4 ++-- src/routes/notifications/+page.svelte | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/components/CommentSection.svelte b/src/lib/components/CommentSection.svelte index 44582e02..3c23c608 100644 --- a/src/lib/components/CommentSection.svelte +++ b/src/lib/components/CommentSection.svelte @@ -298,7 +298,7 @@ const handleDownvote = async (event) => { User avatar diff --git a/src/lib/components/CreateNewPost.svelte b/src/lib/components/CreateNewPost.svelte index 551f12c7..bc7e63a4 100644 --- a/src/lib/components/CreateNewPost.svelte +++ b/src/lib/components/CreateNewPost.svelte @@ -15,7 +15,7 @@
+ : `https://avatar.vercel.sh/${data?.user?.username}`} />
diff --git a/src/lib/components/PostSection.svelte b/src/lib/components/PostSection.svelte index 4250ebc1..8286e06c 100644 --- a/src/lib/components/PostSection.svelte +++ b/src/lib/components/PostSection.svelte @@ -338,7 +338,7 @@ $: { User avatar diff --git a/src/lib/components/TopInvestors.svelte b/src/lib/components/TopInvestors.svelte index b1dadf77..3308effa 100644 --- a/src/lib/components/TopInvestors.svelte +++ b/src/lib/components/TopInvestors.svelte @@ -32,7 +32,7 @@ class="rounded-full {rank === 1 ? 'w-16 h-16 sm:w-20 sm:h-20' : rank === 2 ? 'w-14 h-14 sm:w-16 sm:h-16' : 'w-11 h-11 sm:w-12 sm:h-12'} absolute inset-1/2 transform -translate-x-1/2 -translate-y-1/2" src={data?.expand?.user?.avatar ? getImageURL(data?.expand?.user?.collectionId, data?.expand?.user?.id, data?.expand?.user?.avatar) - : `https://api.dicebear.com/7.x/thumbs/svg?seed=${data?.expand?.user?.username}`} + : `https://avatar.vercel.sh/${data?.expand?.user?.username}`} alt="User avatar" loading="lazy"/> diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5c63fcfd..8a44af27 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -422,7 +422,7 @@ $: { src={data?.user?.avatar ? getImageURL(data?.user.collectionId, data?.user.id, data?.user.avatar) - : `https://api.dicebear.com/7.x/thumbs/svg?seed=${data?.user?.username}`} + : `https://avatar.vercel.sh/${data?.user?.username}`} /> @@ -431,7 +431,7 @@ $: { diff --git a/src/routes/blog/+page.svelte b/src/routes/blog/+page.svelte index 82a864bc..1a45bf69 100644 --- a/src/routes/blog/+page.svelte +++ b/src/routes/blog/+page.svelte @@ -182,7 +182,7 @@ let allBlogPosts = data?.getAllBlogPost; class="rounded-full w-10 h-10 mr-2" src={item?.expand?.user?.avatar ? getImageURL(item?.expand?.user?.collectionId, item?.expand?.user?.id, item?.expand?.user?.avatar) - : `https://api.dicebear.com/7.x/thumbs/svg?seed=${item?.expand?.user?.username}`} + : `https://avatar.vercel.sh/${item?.expand?.user?.username}`} alt="User avatar" loading='lazy'/> {item?.expand?.user?.username} · {new Date(item?.created)?.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} diff --git a/src/routes/blog/article/[slug]/+page.svelte b/src/routes/blog/article/[slug]/+page.svelte index 33ba77ee..25998b0d 100644 --- a/src/routes/blog/article/[slug]/+page.svelte +++ b/src/routes/blog/article/[slug]/+page.svelte @@ -68,7 +68,7 @@ const article = data?.getArticle; class="rounded-full w-10 h-10 mr-2" src={article?.expand?.user?.avatar ? getImageURL(article?.expand?.user?.collectionId, article?.expand?.user?.id, article?.expand?.user?.avatar) - : `https://api.dicebear.com/7.x/thumbs/svg?seed=${article?.expand?.user?.username}`} + : `https://avatar.vercel.sh/${article?.expand?.user?.username}`} alt="User avatar" loading='lazy'/>
diff --git a/src/routes/community/post/[postId]/+page.svelte b/src/routes/community/post/[postId]/+page.svelte index acf734ab..16c71bb1 100644 --- a/src/routes/community/post/[postId]/+page.svelte +++ b/src/routes/community/post/[postId]/+page.svelte @@ -648,7 +648,7 @@ function updateVote(postVote) { User avatar diff --git a/src/routes/community/profile/+page.svelte b/src/routes/community/profile/+page.svelte index bcde9574..cd21cfa7 100644 --- a/src/routes/community/profile/+page.svelte +++ b/src/routes/community/profile/+page.svelte @@ -618,7 +618,7 @@ onDestroy(async () => { User avatar diff --git a/src/routes/community/user/[userId]/+page.svelte b/src/routes/community/user/[userId]/+page.svelte index f27f4dd8..d269ccdd 100644 --- a/src/routes/community/user/[userId]/+page.svelte +++ b/src/routes/community/user/[userId]/+page.svelte @@ -271,7 +271,7 @@ onMount(async () => { User avatar diff --git a/src/routes/leaderboard/+page.svelte b/src/routes/leaderboard/+page.svelte index d55a7270..00c056b7 100644 --- a/src/routes/leaderboard/+page.svelte +++ b/src/routes/leaderboard/+page.svelte @@ -371,7 +371,7 @@ async function getLeaderboard() { class="rounded-full w-10 h-10 absolute inset-1/2 transform -translate-x-1/2 -translate-y-1/2" src={item?.expand?.user?.avatar ? getImageURL(item?.expand?.user?.collectionId, item?.expand?.user?.id, item?.expand?.user?.avatar) - : `https://api.dicebear.com/7.x/thumbs/svg?seed=${item?.expand?.user?.username}`} + : `https://avatar.vercel.sh/${item?.expand?.user?.username}`} alt="User avatar" />
@@ -445,7 +445,7 @@ async function getLeaderboard() { class="rounded-full w-8 h-8 absolute inset-1/2 transform -translate-x-1/2 -translate-y-1/2" src={item?.expand?.user?.avatar ? getImageURL(item?.expand?.user?.collectionId, item?.expand?.user?.id, item?.expand?.user?.avatar) - : `https://api.dicebear.com/7.x/thumbs/svg?seed=${item?.expand?.user?.username}`} + : `https://avatar.vercel.sh/${item?.expand?.user?.username}`} alt="User avatar" /> diff --git a/src/routes/notifications/+page.svelte b/src/routes/notifications/+page.svelte index 17e1abbb..4aad3be7 100644 --- a/src/routes/notifications/+page.svelte +++ b/src/routes/notifications/+page.svelte @@ -150,7 +150,7 @@ onMount(async () => { User avatar