Spaces:
Runtime error
Runtime error
File size: 423 Bytes
9e93b10 9ed2e2f 9e93b10 9ed2e2f 9e93b10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <script>
import { REXPRO_BASE_URL } from "$lib/constants";
import { shortCodesToEmojis } from "$lib/stores";
export let shortCode;
export let className = "size-4";
</script>
{#if $shortCodesToEmojis[shortCode]}
<img
src="{REXPRO_BASE_URL}/assets/emojis/{$shortCodesToEmojis[
shortCode
].toLowerCase()}.svg"
alt={shortCode}
class={className}
loading="lazy"
/>
{:else}
<div>
{shortCode}
</div>
{/if}
|