Skip to content

Commit

Permalink
feat: display 'None provided' when no source code linked instead of b…
Browse files Browse the repository at this point in the history
…lank (#144)
  • Loading branch information
budak7273 authored Dec 22, 2023
1 parent 14a38da commit ae25a36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/components/mods/ModInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
<h3 class="text-2xl my-4 font-bold">Info</h3>
<span
><strong>{$t('entry.source')}:</strong>
<a class="underline text-yellow-500" href={mod.source_url}>{mod.source_url}</a></span
><br />
{#if mod.source_url.length > 0}
<a class="underline text-yellow-500" href={mod.source_url}>{mod.source_url}</a>
{:else}
{$t('entry.source.none-provided')}
{/if}
</span><br />
<span><strong>{$t('entry.created-at')}:</strong> {prettyDate(mod.created_at)}</span><br />
<span><strong>{$t('entry.views')}:</strong> {prettyNumber(mod.views)}</span><br />
<span><strong>{$t('downloads')}:</strong> {prettyNumber(mod.downloads)}</span><br />
Expand Down

0 comments on commit ae25a36

Please sign in to comment.