Skip to content

Commit

Permalink
fix: add thumbhash default
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Aug 27, 2024
1 parent ad1ec86 commit b76e1ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/components/general/FicsitCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
export let description = '';
export let link = '/';
export let fake = false;
export let thumbhash = '2/eFDQIsFmh9h4BreKeAeQqYBxd3d3J4Jw';
export let thumbhash = '';
$: renderedLogo = logo || assets + '/images/no_image.webp';
$: renderedName = name || (fake && 'Card Name');
$: renderedDescription = description || (fake && 'Short card description');
$: renderedThumbhash = thumbhash || '2/eFDQIsFmh9h4BreKeAeQqYBxd3d3J4Jw';
$: thumbHashData = (() => {
try {
return thumbHashToDataURL(
new Uint8Array(
atob(thumbhash)
atob(renderedThumbhash)
.split('')
.map((x) => x.charCodeAt(0))
)
Expand Down

0 comments on commit b76e1ce

Please sign in to comment.