Skip to content

Commit

Permalink
enhancement: remove placeholder on images (#6124)
Browse files Browse the repository at this point in the history
* enhancement: remove placeholder on nft images

* fix: fix background png nfts
  • Loading branch information
MarkNerdi996 authored Mar 10, 2023
1 parent b6b259b commit 9913a86
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions packages/shared/components/molecules/NftMedia.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,13 @@
{backupUrl}
expectedType={nft.parsedMetadata.type}
alt={`Media display for ${nft.name}`}
classes="hidden {classes}"
{autoplay}
{controls}
{loop}
{muted}
classes="{isLoaded ? '' : 'hidden'} {classes}"
onLoad={handleOnLoad}
onError={handleLoadingError}
onWarning={handleWarning}
/>

{#if !isLoaded}
<slot name="placeholder">
<MediaPlaceholder type={nft?.parsedMetadata?.type} {bgColor} {darkBgColor} classes="animate-pulse" />
</slot>
{:else}
<MediaDisplay
{url}
{backupUrl}
expectedType={nft.parsedMetadata.type}
alt={`Media display for ${nft.name}`}
{autoplay}
{controls}
{loop}
{muted}
{classes}
onError={handleLoadingError}
onWarning={handleWarning}
/>
{/if}
{/if}

0 comments on commit 9913a86

Please sign in to comment.