mirror of
https://github.com/LukeHagar/sveltesociety.dev.git
synced 2025-12-07 04:21:40 +00:00
fix: no stars print if undefined
- fixes at the same time undefined stars when rehydratation
This commit is contained in:
@@ -95,22 +95,22 @@
|
|||||||
<Tag title={tag} variant='blue' />
|
<Tag title={tag} variant='blue' />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<div class="card__bottom">
|
{#if stars > 0}
|
||||||
<div>
|
<div class="card__bottom">
|
||||||
{#if stars > 0}
|
<div>
|
||||||
{#if (repo || url).includes('github')}
|
{#if (repo || url).includes('github')}
|
||||||
<img style="display:inline" src="/images/github_logo.svg" alt="github logo" />
|
<img style="display:inline" src="/images/github_logo.svg" alt="github logo" />
|
||||||
{:else if (repo || url).includes('gitlab')}
|
{:else if (repo || url).includes('gitlab')}
|
||||||
<img style="display:inline" src="/images/gitlab_logo.svg" alt="gitlab logo" />
|
<img style="display:inline" src="/images/gitlab_logo.svg" alt="gitlab logo" />
|
||||||
<!-- {:else} -->
|
<!-- {:else} -->
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
</div>
|
||||||
|
<div>
|
||||||
|
★
|
||||||
|
<code>{stars}</code>
|
||||||
|
</div>
|
||||||
|
<!-- commenting out dates just cause it is not very updated yet - all the cards show same date. put back in when we have better scraping -->
|
||||||
|
<!-- <datetime value={addedOn}>{new Intl.DateTimeFormat('en-Us').format(Date.parse(addedOn))}</datetime> -->
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{/if}
|
||||||
★
|
|
||||||
<code>{stars}</code>
|
|
||||||
</div>
|
|
||||||
<!-- commenting out dates just cause it is not very updated yet - all the cards show same date. put back in when we have better scraping -->
|
|
||||||
<!-- <datetime value={addedOn}>{new Intl.DateTimeFormat('en-Us').format(Date.parse(addedOn))}</datetime> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user