aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Avatar.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-27 09:30:52 -0800
committerAdam Soltys <[email protected]>2023-01-27 09:30:52 -0800
commit1ff3877220343972ba8e7008b7338b41cc4c876d (patch)
tree536c125fe89f92b93ba512f396c4b21cb8f22064 /src/components/Avatar.svelte
parentd1216faac02e7c02c2f5783ba60c4b35775e5001 (diff)
downloadcoinos-ui-1ff3877220343972ba8e7008b7338b41cc4c876d.tar.gz
coinos-ui-1ff3877220343972ba8e7008b7338b41cc4c876d.zip
image previews
Diffstat (limited to 'src/components/Avatar.svelte')
-rw-r--r--src/components/Avatar.svelte6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/Avatar.svelte b/src/components/Avatar.svelte
index 09161e01..43331c19 100644
--- a/src/components/Avatar.svelte
+++ b/src/components/Avatar.svelte
@@ -1,5 +1,5 @@
<script>
- import { colorTheme } from '$lib/store';
+ import { avatar, banner, colorTheme } from '$lib/store';
import { Icon } from '$comp';
import { punk } from '$lib/utils';
@@ -10,9 +10,9 @@
$: s = size.toString();
$: link = user.anon ? `/${user.pubkey}` : `/${user.username}`;
- $: src =
+ $: src = ($avatar?.id === user.id && $avatar.src) ||
'/api/public/' +
- (user?.profile ? user.id + '-profile.webp' : 'punks/' + punk(user?.pubkey || user?.id || 'aa'));
+ (user.profile ? user.id + '-profile.webp' : 'punks/' + punk(user.pubkey || user.id || 'aa'));
</script>
<a href={link} class:pointer-events-none={disabled}>