fix: stats

This commit is contained in:
thomas
2024-03-28 10:48:59 +01:00
parent bb4d1b14a0
commit 7da9b83eb3
2 changed files with 7 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
<script>
import MyIcon from './MyIcon.astro';
import { onMount } from 'svelte';
let error = false;
@@ -33,12 +32,12 @@
{#if !error && !loading}
<div class="github">
<a class="category" href="https://github.com/tomalaforge/angular-challenges">
<MyIcon name="star" />
<slot name="star"/>
<div>{stargazersCount}</div>
</a>
<div class="category fork">
<MyIcon name="fork" viewBox="0 0 16 16" />
<slot name="fork"/>
<div>{forksCount}</div>
</div>
</div>

View File

@@ -1,6 +1,7 @@
---
import Default from '@astrojs/starlight/components/SiteTitle.astro';
import GitHubStats from './GitHubStats.svelte';
import MyIcon from './MyIcon.astro';
---
@@ -8,6 +9,9 @@ import GitHubStats from './GitHubStats.svelte';
<slot />
</Default>
<GitHubStats client:load />
<GitHubStats client:load >
<MyIcon name="star" slot="star" />
<MyIcon name="fork" viewBox="0 0 16 16" slot="fork"/>
</GitHubStats>