Skip to content

Commit

Permalink
Merge pull request #372 from CirclesUBI/feature/app-426-asset-page-re…
Browse files Browse the repository at this point in the history
…turns-blank

fix Asset page returns blank
  • Loading branch information
dacianavram authored Jul 25, 2023
2 parents 8f48652 + d9fcb9d commit 5d99a00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shell/src/shared/atoms/ItemCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function cardAction() {
<div class="flex items-center w-full space-x-2 bg-white border cardborder" class:p-3="{!params.edgeless}">
<slot name="itemCardStart">
<div class="">
<UserImage profile="{params.imageProfile}" size="{12}" profileLink="{params.profileLink}" />
<UserImage profile="{params}" image="{params.imageUrl}" size="{12}" profileLink="{params.profileLink}" />
</div>
</slot>
<slot name="itemCardBody">
Expand Down
12 changes: 8 additions & 4 deletions shell/src/shared/atoms/UserImage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ export let transparent: boolean = false;
export let tooltip: boolean = false;
export let profileLink: boolean = true;
export let editable: boolean = false;
export let image: string = "";
let displayName: string = "";
let isOrganisation: boolean = false;
let sizeInPixels = 0;
let noAvatar;
const seed = Web3.utils.hexToNumber(profile.circlesAddress.slice(0, 15));
let noAvatar = jazzicon(size === 15 ? 54 : size * 4, seed);
if (!image && !profile.avatarUrl) {
const seed = Web3.utils.hexToNumber(profile.circlesAddress?.slice(0, 15));
noAvatar = jazzicon(size === 15 ? 54 : size * 4, seed);
}
function linkToProfile(event) {
if (profileLink) {
Expand Down Expand Up @@ -78,12 +82,12 @@ $: {
class:w-4="{size < 20}"
class:h-4="{size < 20}" />
{/if}
{#if profile.avatarUrl}
{#if profile.avatarUrl || image}
<img
class=" w-{size} h-{size} rounded-corners-purple-borders"
class:rounded-full="{!isOrganisation}"
class:rounded-md="{isOrganisation}"
src="{profile.avatarUrl}"
src="{profile.avatarUrl || image}"
alt="{displayName}" />
{:else}
<div class=" w-{size} h-{size} no-avatar-container" class:rounded-full="{!isOrganisation}" class:rounded-md="{isOrganisation}" class:dashboard-avatar="{size === 15}">
Expand Down

0 comments on commit 5d99a00

Please sign in to comment.